summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-06-29 17:02:37 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-06-29 17:02:37 +0000
commitc6e604d87565796bd3c0b291f2a731ef17f3ac46 (patch)
tree1b2588f095518031ca99e59d0af918584001aa92 /etc/inc
parent80e7aa3e00a4682fd96ba05650bf9eee3e97abb1 (diff)
downloadpfsense-c6e604d87565796bd3c0b291f2a731ef17f3ac46.zip
pfsense-c6e604d87565796bd3c0b291f2a731ef17f3ac46.tar.gz
Do a more graceful carp handover.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/interfaces.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 180d608..1e50208 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -267,14 +267,13 @@ function interfaces_carp_configure() {
mwexec("/sbin/ifconfig pfsync0 create");
mwexec("/sbin/ifconfig pfsync0 syncdev " . $carp_sync_int);
mwexec("/sbin/ifconfig pfsync0 syncif " . $carp_sync_int);
- mwexec("/sbin/ifconfig {$carp_sync_int} up");
mwexec("/sbin/ifconfig pfsync0 up");
if($g['booting']) {
/* install rules to alllow pfsync to sync up during boot
* carp interfaces will remain down until the bootup sequence finishes
*/
exec("echo pass quick proto carp all keep state > /tmp/rules.boot");
- exec("echo pass quick proto pfsync all keep state >> /tmp/rules.boot");
+ exec("echo pass quick proto pfsync all >> /tmp/rules.boot");
exec("echo pass out proto { tcp, udp } from any to any port 53 keep state >> /tmp/rules.boot");
exec("/sbin/pfctl -f /tmp/rules.boot");
}
@@ -287,6 +286,7 @@ function interfaces_carp_configure() {
* create the carp interface
*/
mwexec("/sbin/ifconfig carp" . $carp_instances_counter . " create");
+ mwexec("/sbin/ifconfig carp" . $carp_instances_counter . " down");
$broadcast_address = gen_subnet_max($carp['ipaddress'], $carp['netmask']);
if($carp['password'] != "") {
$password = " pass " . $carp['password'];
@@ -310,6 +310,8 @@ function interfaces_carp_configure() {
function interfaces_carp_bringup() {
global $g, $config;
/* lets bring the carp interfaces up now */
+ if ($g['booting'])
+ sleep(5);
$carp_ints = find_number_of_created_carp_interfaces();
for($x=0; $x<$carp_ints; $x++)
mwexec("/sbin/ifconfig carp{$carp_instances_counter} up");
OpenPOWER on IntegriCloud