summaryrefslogtreecommitdiff
path: root/lib/Vyatta
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@io.vyatta.com>2009-03-01 09:44:30 -0800
committerStig Thormodsrud <stig@io.vyatta.com>2009-03-01 09:44:30 -0800
commit449ca5016fb6f42abfecdda7fc906ed81f4d439e (patch)
treed8fdfe1741e859347f659d5ac5a7472ee4430487 /lib/Vyatta
parentf6c3d454f99f430bfb538ba2008965a0eab97527 (diff)
downloadvyatta-cfg-system-449ca5016fb6f42abfecdda7fc906ed81f4d439e.tar.gz
vyatta-cfg-system-449ca5016fb6f42abfecdda7fc906ed81f4d439e.zip
Fix 4152: Add support for VRRP operation on unnumbered interfaces
Diffstat (limited to 'lib/Vyatta')
-rwxr-xr-xlib/Vyatta/Keepalived.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Vyatta/Keepalived.pm b/lib/Vyatta/Keepalived.pm
index 5267d102..1f3c2592 100755
--- a/lib/Vyatta/Keepalived.pm
+++ b/lib/Vyatta/Keepalived.pm
@@ -157,12 +157,14 @@ sub vrrp_get_config {
if (!defined $primary_addr) {
$primary_addr = "0.0.0.0";
}
-
if ($primary_addr =~ m/(\d+\.\d+\.\d+\.\d+)\/\d+/) {
- $primary_addr = $1;
+ $primary_addr = $1; # strip /mask
}
$config->setLevel("$path vrrp vrrp-group $group");
+ my $source_addr = $config->returnOrigValue("hello-source-address");
+ $primary_addr = $source_addr if defined $source_addr;
+
my @vips = $config->returnOrigValues("virtual-address");
my $priority = $config->returnOrigValue("priority");
if (!defined $priority) {