diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2013-06-18 18:49:39 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2013-06-18 18:49:39 -0400 |
commit | 34cb0a39d7d14ecba7a4fc5060a04760d3921bc8 (patch) | |
tree | be1f93eff4980ae6cf3f0d3bbbd5735a426f7b60 /config/quagga_ospfd/quagga_ospfd.inc | |
parent | 8c5840439b815474d2a39434147b7892590198f3 (diff) | |
parent | 268bcb9a886494c81191ec63e220ec1c02508b65 (diff) | |
download | pfsense-packages-34cb0a39d7d14ecba7a4fc5060a04760d3921bc8.tar.gz pfsense-packages-34cb0a39d7d14ecba7a4fc5060a04760d3921bc8.tar.bz2 pfsense-packages-34cb0a39d7d14ecba7a4fc5060a04760d3921bc8.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'config/quagga_ospfd/quagga_ospfd.inc')
-rw-r--r-- | config/quagga_ospfd/quagga_ospfd.inc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/config/quagga_ospfd/quagga_ospfd.inc b/config/quagga_ospfd/quagga_ospfd.inc index 46037bd9..aabd27a8 100644 --- a/config/quagga_ospfd/quagga_ospfd.inc +++ b/config/quagga_ospfd/quagga_ospfd.inc @@ -243,6 +243,20 @@ function quagga_ospfd_install_conf() { fwrite($fd, $zebraconffile); fclose($fd); + $carp_ip_status_check = ""; + if (is_ipaddr($ospfd_conf['carpstatusip'])) { + $carpcheckinterface = trim(find_carp_interface($ospfd_conf['carpstatusip'])); + $carp_ip_status_check = <<<EOF + +CARP_STATUS=`/sbin/ifconfig {$carpcheckinterface} | /usr/bin/grep carp: | /usr/bin/awk '{print \$2;}'` +if [ \${CARP_STATUS} != "MASTER" ]; then + exit; +fi + +EOF; + } + + // Create rc.d file $rc_file_stop = <<<EOF if [ -e /var/run/quagga/zebra.pid ]; then @@ -274,6 +288,7 @@ fi killall -9 zebra 2>/dev/null killall -9 ospfd 2>/dev/null sleep 1 +{$carp_ip_status_check} /usr/local/sbin/zebra -d -f {$quagga_config_base}/zebra.conf /usr/local/sbin/ospfd -d -f {$quagga_config_base}/ospfd.conf EOF; @@ -363,7 +378,7 @@ function quagga_ospfd_put_raw_config($conffile) { } function quagga_get_carp_status_by_ip($ipaddr) { - $iface = find_carp_interface($ipaddr); + $iface = trim(find_carp_interface($ipaddr)); if ($iface) { $status = get_carp_interface_status($iface); // If there is no status for that interface, return null. |