aboutsummaryrefslogtreecommitdiffstats
path: root/packages/carp.xml
diff options
context:
space:
mode:
Diffstat (limited to 'packages/carp.xml')
-rw-r--r--packages/carp.xml5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/carp.xml b/packages/carp.xml
index 2f60836a..308ce2b9 100644
--- a/packages/carp.xml
+++ b/packages/carp.xml
@@ -221,7 +221,10 @@
*/
system("/sbin/ifconfig carp" . $carp_instances_counter . " create");
$broadcast_address = gen_subnet_max($carp['ipaddress'], $carp['netmask']);
- $carp_command = "/sbin/ifconfig carp" . $carp_instances_counter . " " . $carp['ipaddress'] . " " . $carp['netmask'] . " broadcast " . $broadcast_address . " vhid " . $carp['vhid'] . $carp['advskew '] . " pass " . $carp['password'];
+ if($carp['password'] != "") {
+ $password = " pass " . $carp['password'];
+ }
+ $carp_command = "/sbin/ifconfig carp" . $carp_instances_counter . " " . $carp['ipaddress'] . " " . $carp['netmask'] . " broadcast " . $broadcast_address . " vhid " . $carp['vhid'] . $carp['advskew '] . $password;
if($carp['balancing'] == "true") $using_arp_balance = 1;
if($carp['preempt'] == "true") $using_preempt = 1;
fwrite($fout, $carp_command . "\n");