summaryrefslogtreecommitdiff
path: root/scripts/keepalived/vyatta-vrrp-state.pl
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-12-08 11:22:09 -0800
committerJohn Southworth <john.southworth@vyatta.com>2011-12-08 11:22:09 -0800
commit5974f4d6a757c9219f13266df7b714d31fa6b7eb (patch)
treed803ce5c019343a8246aa266c91578da7e7e5f03 /scripts/keepalived/vyatta-vrrp-state.pl
parent98ea07e76bb82a3fe60b7f8d2e6d23ea0b2da539 (diff)
downloadvyatta-cfg-system-5974f4d6a757c9219f13266df7b714d31fa6b7eb.tar.gz
vyatta-cfg-system-5974f4d6a757c9219f13266df7b714d31fa6b7eb.zip
Fix sysctl application for vlan interfaes
Diffstat (limited to 'scripts/keepalived/vyatta-vrrp-state.pl')
-rwxr-xr-xscripts/keepalived/vyatta-vrrp-state.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/keepalived/vyatta-vrrp-state.pl b/scripts/keepalived/vyatta-vrrp-state.pl
index 53c7c6c9..bb04df1d 100755
--- a/scripts/keepalived/vyatta-vrrp-state.pl
+++ b/scripts/keepalived/vyatta-vrrp-state.pl
@@ -70,6 +70,7 @@ if ($vrrp_state eq 'backup') {
# comment out for now, too expensive with lots of vrrp's at boot
# Vyatta::Keepalived::snoop_for_master($vrrp_intf, $vrrp_group,
# $vrrp_vips[0], 60);
+ $vrrp_intf =~ s/\./\//g;
system("sysctl -w net.ipv4.conf.".$vrrp_intf."v".$vrrp_group.".arp_filter=1");
system("sysctl -w net.ipv4.conf.".$vrrp_intf."v".$vrrp_group.".accept_local=1");
} elsif ($vrrp_state eq 'master') {
@@ -79,6 +80,7 @@ if ($vrrp_state eq 'backup') {
# requests. Some of those host do respond to gratuitous arp replies
# so here we will send 5 gratuitous arp replies also.
#
+ $vrrp_intf =~ s/\./\//g;
system("sysctl -w net.ipv4.conf.".$vrrp_intf."v".$vrrp_group.".arp_filter=0");
system("sysctl -w net.ipv4.conf.".$vrrp_intf."v".$vrrp_group.".accept_local=1");
foreach my $vip (@vrrp_vips) {