diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-12-06 15:14:21 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-12-06 15:14:21 -0800 |
commit | 7ab4c3cc61a2062a6702a3fe48efb19b0671e901 (patch) | |
tree | 234ce2f41a0a91926c87feaf006282d3ec323157 /scripts/keepalived | |
parent | 2553042a7a687c5bc90ad9a19da742b8829bbd73 (diff) | |
download | vyatta-cfg-system-7ab4c3cc61a2062a6702a3fe48efb19b0671e901.tar.gz vyatta-cfg-system-7ab4c3cc61a2062a6702a3fe48efb19b0671e901.zip |
Move is_local_address to common code
Now part of lib/Vyatta/Misc.pm module
Diffstat (limited to 'scripts/keepalived')
-rwxr-xr-x | scripts/keepalived/vyatta-keepalived.pl | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/scripts/keepalived/vyatta-keepalived.pl b/scripts/keepalived/vyatta-keepalived.pl index 651832b1..dae60fcf 100755 --- a/scripts/keepalived/vyatta-keepalived.pl +++ b/scripts/keepalived/vyatta-keepalived.pl @@ -30,7 +30,6 @@ use Vyatta::Interface; use Vyatta::ConntrackSync; use Vyatta::Misc; use Getopt::Long; -use Socket; use strict; use warnings; @@ -40,18 +39,6 @@ my ( $conf_file, $changes_file ); my %HoA_sync_groups; my $ctsync_script = "/opt/vyatta/sbin/vyatta-vrrp-conntracksync.sh"; - -# To test if IP address is local use the kernel since -# Linux will only allow binding to local addresses -sub is_local_address { - my $addr = shift; - - socket( my $sock, PF_INET, SOCK_STREAM, 0) - or die "socket failed\n"; - - return bind($sock, sockaddr_in(0, inet_aton($addr))); -} - sub validate_source_addr { my ( $ifname, $source_addr ) = @_; |