summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Keepalived.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Vyatta/Keepalived.pm')
-rwxr-xr-xlib/Vyatta/Keepalived.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Vyatta/Keepalived.pm b/lib/Vyatta/Keepalived.pm
index 0c63476..6a81b47 100755
--- a/lib/Vyatta/Keepalived.pm
+++ b/lib/Vyatta/Keepalived.pm
@@ -253,6 +253,10 @@ sub vrrp_get_config {
if (!defined $vmac_interface) {
$vmac_interface = 0;
}
+ if ($vmac_interface && $primary_addr eq "0.0.0.0"){
+ $primary_addr = $vips[0];
+ $primary_addr =~ s/(.*?)\/.*/$1/;
+ }
$config->setLevel("$path vrrp vrrp-group $group authentication");
my $auth_type = $config->returnOrigValue("type");