summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-05-23 15:08:31 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-05-23 15:08:31 +0000
commitb91f923ac9294d32431561ab1fcb28d346ac5fe9 (patch)
tree724e74bf3fa863e1a6ac35ad63bb5c11e06364e3 /etc
parent5c74f3392c1dd2dcc0ac3ed16a8d631361d6e735 (diff)
downloadpfsense-b91f923ac9294d32431561ab1fcb28d346ac5fe9.zip
pfsense-b91f923ac9294d32431561ab1fcb28d346ac5fe9.tar.gz
Allow user to specify interface. This will allow CARP to work on DHCP interfaces, etc!
And the crowd goes nuts!
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index eebb3bb..16a3b9f 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -304,7 +304,11 @@ function interfaces_carp_configure() {
if($carp['password'] != "") {
$password = " pass " . $carp['password'];
}
- mwexec("/sbin/ifconfig carp" . $carp_instances_counter . " " . $carp['ipaddress'] . "/" . $carp['netmask'] . " broadcast " . $broadcast_address . " vhid " . $carp['vhid'] . " advskew " . $carp['advskew'] . $password);
+ $carpdev = "";
+ if($carp['interface'] <> "AUTO") {
+ $carpdev = " carpdev {$carp['interface']} ";
+ }
+ mwexec("/sbin/ifconfig carp" . $carp_instances_counter . " " . $carp['ipaddress'] . "/" . $carp['netmask'] . " broadcast " . $broadcast_address . " vhid " . $carp['vhid'] . "{$carpdev} advskew " . $carp['advskew'] . $password);
$carp_instances_counter++;
}
}
OpenPOWER on IntegriCloud