summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-10 15:25:16 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-10 15:25:16 +0000
commit75f2c22ccc5e30241722e57abd8af534a980ac12 (patch)
treeab05d9449b2d51e807586d761094a5a85049933b /etc/inc/interfaces.inc
parent74fbc07edca161646e27d901ff2755913eaf78e3 (diff)
downloadpfsense-75f2c22ccc5e30241722e57abd8af534a980ac12.zip
pfsense-75f2c22ccc5e30241722e57abd8af534a980ac12.tar.gz
Remove any dangling carp occurances. This bug showed its head during the hackathon.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index e0fd8b2..998fbd1 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -310,6 +310,7 @@ function interfaces_carp_configure() {
unlink_if_exists("/usr/local/pkg/pf/carp_rules.sh");
$carp_instances_counter = 0;
$pfsync_instances_counter = 0;
+ $total_carp_interfaces_defined = find_number_of_created_carp_interfaces();
if (is_array($config['virtualip']['vip'])) {
if(is_array($config['installedpackages']['carpsettings']['config'])) {
foreach($config['installedpackages']['carpsettings']['config'] as $carp)
@@ -360,6 +361,11 @@ function interfaces_carp_configure() {
}
}
}
+ /* remove any dangling carp references */
+ for($x=$carp_instances_counter; $x<$total_carp_interfaces_defined; $x++) {
+ mwexec("/sbin/ifconfig carp{$x} down");
+ mwexec("/sbin/ifconfig carp{$x} destroy");
+ }
unmute_kernel_msgs();
if ($g['booting']) {
unmute_kernel_msgs();
OpenPOWER on IntegriCloud