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:33:54 +0000
commit6d8097b2ad92f5cd817e4c691fc1dc76356894a4 (patch)
tree35c08072ff0520e3af291fbe854160f89beb4114 /etc/inc/interfaces.inc
parent5237d356f41b6ac44cabaaa17208795b8471abcd (diff)
downloadpfsense-6d8097b2ad92f5cd817e4c691fc1dc76356894a4.zip
pfsense-6d8097b2ad92f5cd817e4c691fc1dc76356894a4.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 278758d..9a984dc 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1682,6 +1682,17 @@ function interfaces_carp_setup() {
} else
$cmdchain->add("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("Allow CARP.", "/sbin/sysctl net.inet.carp.allow=1", true);
else
OpenPOWER on IntegriCloud