diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-05-23 15:08:31 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-05-23 15:08:31 +0000 |
commit | b91f923ac9294d32431561ab1fcb28d346ac5fe9 (patch) | |
tree | 724e74bf3fa863e1a6ac35ad63bb5c11e06364e3 | |
parent | 5c74f3392c1dd2dcc0ac3ed16a8d631361d6e735 (diff) | |
download | pfsense-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!
-rw-r--r-- | etc/inc/interfaces.inc | 6 |
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++; } } |