From f7ad82f39285d51bb9597804c6ef3527a25cd081 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Wed, 28 Dec 2011 11:48:40 -0800 Subject: Move vrrp input filter creation to keepalived for faster transitions --- scripts/keepalived/vyatta-vrrp-state.pl | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/keepalived/vyatta-vrrp-state.pl b/scripts/keepalived/vyatta-vrrp-state.pl index 1b2f4964..4ab4834a 100755 --- a/scripts/keepalived/vyatta-vrrp-state.pl +++ b/scripts/keepalived/vyatta-vrrp-state.pl @@ -75,10 +75,6 @@ if ($vrrp_state eq 'backup') { # $vrrp_vips[0], 60); # Filter traffic incoming to the vmac interface when in backup state # Delete the rule then add it to insure that we don't get duplicates - if ($transition_intf =~ m/\w+v\d+/){ - system("iptables -t raw -D VYATTA_VRRP_FILTER -i ".$transition_intf." ! -p 112 -j DROP"); - system("iptables -t raw -I VYATTA_VRRP_FILTER -i ".$transition_intf." ! -p 112 -j DROP"); - } } elsif ($vrrp_state eq 'master') { # # keepalived will send gratuitous arp requests on master transition @@ -86,9 +82,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. # - if ($transition_intf =~ m/\w+v\d+/){ - system("iptables -t raw -D VYATTA_VRRP_FILTER -i ".$transition_intf." ! -p 112 -j DROP"); - } else { + unless ($transition_intf =~ m/\w+v\d+/){ foreach my $vip (@vrrp_vips) { system("/usr/bin/arping -A -c5 -I $vrrp_intf $vip"); } -- cgit v1.2.3