summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-02-04 21:09:59 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-02-04 21:09:59 +0000
commit1288bfc1dcedb693073239bb2571501dd26b8405 (patch)
tree2ccbe1479de90e8f8eb016a589e695af4f524bfa
parentde6b5ecee979c54e9b550945a7f27bed0487be23 (diff)
downloadpfsense-1288bfc1dcedb693073239bb2571501dd26b8405.zip
pfsense-1288bfc1dcedb693073239bb2571501dd26b8405.tar.gz
When a CARP parent interface is down or disabled, ignore the CARP IP
address as this will introduce a panic situation in FreeBSD.
-rw-r--r--etc/inc/interfaces.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 2a933c5..d8c0a93 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -444,6 +444,9 @@ function interfaces_carp_configure() {
for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++)
$iflist['opt' . $i] = 'opt' . $i;
foreach($iflist as $if) {
+ /* ignore down or "disabled" interfaces */
+ if (!isset($config['interfaces'][$if]['enable']))
+ continue;
$ww_subnet_ip = $config['interfaces'][$if]['ipaddr'];
$ww_subnet_bits = $config['interfaces'][$if]['subnet'];
if (ip_in_subnet($vip['subnet'], gen_subnet($ww_subnet_ip, $ww_subnet_bits) . "/" . $ww_subnet_bits))
OpenPOWER on IntegriCloud