summaryrefslogtreecommitdiff
path: root/scripts/keepalived
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-12-01 13:12:35 -0800
committerJohn Southworth <john.southworth@vyatta.com>2011-12-01 13:12:35 -0800
commiteaa1e5d50a42adfdc8e79f19f835d1329b639190 (patch)
treea7222cabcf5620de5d996e08477a19446169202c /scripts/keepalived
parentf80007847ceb4aa0ed55c6f3c39b8aee8db98ce4 (diff)
downloadvyatta-cfg-system-eaa1e5d50a42adfdc8e79f19f835d1329b639190.tar.gz
vyatta-cfg-system-eaa1e5d50a42adfdc8e79f19f835d1329b639190.zip
Adjust the sysctl values of vrrp interfaces on master/backup transitions
Diffstat (limited to 'scripts/keepalived')
-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 e4da85eb..eab717bf 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);
+ system("sysctl -w net.ipv4.conf.".$vrrp_intf."v".$vrrp_group.".arp_filter=1");
} elsif ($vrrp_state eq 'master') {
#
# keepalived will send gratuitous arp requests on master transition
@@ -77,6 +78,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.
#
+ system("sysctl -w net.ipv4.conf.".$vrrp_intf."v".$vrrp_group.".arp_filter=0");
foreach my $vip (@vrrp_vips) {
system("/usr/bin/arping -A -c5 -I $vrrp_intf $vip");
}