summaryrefslogtreecommitdiff
path: root/scripts/keepalived
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@uffda.(none)>2007-11-19 15:55:45 -0800
committerStig Thormodsrud <stig@uffda.(none)>2007-11-19 15:55:45 -0800
commit5d09a07e0fa9567559f2929f026cdf970a8015df (patch)
treea0777053bed4d093bb90fe11d5f227389ef047ba /scripts/keepalived
parentf50d376954e29731a1577b94f52193a13059d047 (diff)
downloadvyatta-cfg-quagga-5d09a07e0fa9567559f2929f026cdf970a8015df.tar.gz
vyatta-cfg-quagga-5d09a07e0fa9567559f2929f026cdf970a8015df.zip
Fix 2498 vrrp configuration can NOT be committed.
Diffstat (limited to 'scripts/keepalived')
-rwxr-xr-xscripts/keepalived/VyattaKeepalived.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/keepalived/VyattaKeepalived.pm b/scripts/keepalived/VyattaKeepalived.pm
index c8d732d1..f7e62b19 100755
--- a/scripts/keepalived/VyattaKeepalived.pm
+++ b/scripts/keepalived/VyattaKeepalived.pm
@@ -136,7 +136,11 @@ sub vrrp_get_config {
my $config = new VyattaConfig;
$config->setLevel("interfaces ethernet $intf");
- my $primary_addr = $config->returnOrigValue("address");
+ my $primary_addr = $config->returnOrigValue("address");
+ if (!defined $primary_addr) {
+ $primary_addr = "0.0.0.0";
+ }
+
if ($primary_addr =~ m/(\d+\.\d+\.\d+\.\d+)\/\d+/) {
$primary_addr = $1;
}