summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2011-07-11 20:27:25 +0000
committerErmal <eri@pfsense.org>2011-07-11 20:27:25 +0000
commit6930e805be1c889f656c2369d72c49dd8bec2bc0 (patch)
tree7b1f9ab3f1a185e204faf8ac20669f23b787afa5 /etc/inc/interfaces.inc
parent3cfc695c36407ffeb22e37f723b2ec8d1141de64 (diff)
downloadpfsense-6930e805be1c889f656c2369d72c49dd8bec2bc0.zip
pfsense-6930e805be1c889f656c2369d72c49dd8bec2bc0.tar.gz
If the sync has not finished do not start carp yet
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc11
1 files changed, 11 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 7e178ce..e7607e1 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1682,6 +1682,17 @@ function interfaces_carp_setup() {
} else
$cmdchain->add(gettext("Bring up pfsync0"), "/sbin/ifconfig pfsync0 syncdev lo0 up", false);
+ if ($g['booting']) {
+ /* XXX: Handle an issue with pfsync(4) and carp(4). In a cluster carp will come up before pfsync(4) has updated and so will cause issuese
+ * for exiting sessions.
+ */
+ $i = 0;
+ while (intval(trim(`/sbin/ifconfig pfsync0 | /usr/bin/grep 'syncok: 0' | /usr/bin/grep -v grep | /usr/bin/wc -l`)) == 0 && $i < 30) {
+ $i++;
+ sleep(1);
+ }
+ }
+
if($config['virtualip']['vip'])
$cmdchain->add(gettext("Allow CARP."), "/sbin/sysctl net.inet.carp.allow=1", true);
else
OpenPOWER on IntegriCloud