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 | |
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
-rw-r--r-- | debian/control | 2 | ||||
-rwxr-xr-x | scripts/keepalived/vyatta-keepalived.pl | 13 |
2 files changed, 1 insertions, 14 deletions
diff --git a/debian/control b/debian/control index f6ce8dd7..c15d1d0c 100644 --- a/debian/control +++ b/debian/control @@ -15,7 +15,7 @@ Depends: acpid, procps (>= 1:3.2.7-3), coreutils (>= 5.97-5.3), libpam-radius-auth, - vyatta-cfg (>= 0.18), + vyatta-cfg (>= 0.18.56), libc6 (>= 2.7-6), libpam-runtime (>= 1.0.1-5), vyatta-bash | bash (>= 3.1), 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 ) = @_; |