From 449ca5016fb6f42abfecdda7fc906ed81f4d439e Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Sun, 1 Mar 2009 09:44:30 -0800 Subject: Fix 4152: Add support for VRRP operation on unnumbered interfaces --- lib/Vyatta/Keepalived.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/Vyatta/Keepalived.pm') 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) { -- cgit v1.2.3