diff options
author | Stig Thormodsrud <stig@io.vyatta.com> | 2009-03-06 18:10:37 -0800 |
---|---|---|
committer | Stig Thormodsrud <stig@io.vyatta.com> | 2009-03-06 18:10:37 -0800 |
commit | ddfccf438fefe89fad356e9010874ac7c78813e5 (patch) | |
tree | 9c2efabc6165dddefd394245cf1f05d11e99a96b | |
parent | 48c859c6a2e04c6bd38cd3bab1d07f8e8f5adde9 (diff) | |
download | vyatta-cfg-quagga-ddfccf438fefe89fad356e9010874ac7c78813e5.tar.gz vyatta-cfg-quagga-ddfccf438fefe89fad356e9010874ac7c78813e5.zip |
Specify source address with arping since we no longer require an IP
address on the actual interface.
-rwxr-xr-x | lib/Vyatta/Keepalived.pm | 5 | ||||
-rwxr-xr-x | scripts/keepalived/vyatta-show-vrrp.pl | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/Vyatta/Keepalived.pm b/lib/Vyatta/Keepalived.pm index 00a14f95..2c6b2b28 100755 --- a/lib/Vyatta/Keepalived.pm +++ b/lib/Vyatta/Keepalived.pm @@ -12,7 +12,7 @@ # General Public License for more details. # # This code was originally developed by Vyatta, Inc. -# Portions created by Vyatta are Copyright (C) 2007 Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2007-2009 Vyatta, Inc. # All Rights Reserved. # # Author: Stig Thormodsrud @@ -24,7 +24,8 @@ package Vyatta::Keepalived; our @EXPORT = qw(get_conf_file get_state_script get_state_file vrrp_log vrrp_get_init_state get_changes_file - start_daemon restart_daemon stop_daemon); + start_daemon restart_daemon stop_daemon + vrrp_get_config); use base qw(Exporter); use Vyatta::Config; diff --git a/scripts/keepalived/vyatta-show-vrrp.pl b/scripts/keepalived/vyatta-show-vrrp.pl index 0e8e2909..25e71bb4 100755 --- a/scripts/keepalived/vyatta-show-vrrp.pl +++ b/scripts/keepalived/vyatta-show-vrrp.pl @@ -121,8 +121,10 @@ sub get_master_info { my $master_file = Vyatta::Keepalived::get_master_file($intf, $group); my $arp_file = "$master_file.arp"; + my $source_ip = (vrrp_get_config($intf, $group))[0]; - system("/usr/bin/arping -c1 -f -I $intf $vip > $arp_file"); + # arping doesn't seem to work for vlans, maybe we should skip it if vlan? + system("/usr/bin/arping -c1 -f -I $intf -s $source_ip $vip > $arp_file"); my $arp_mac = parse_arping($arp_file); if ( ! -f $master_file) { |