summaryrefslogtreecommitdiff
path: root/scripts/vyatta-interfaces.pl
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-04-24 12:47:46 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-04-24 12:47:46 -0700
commitbc9a250955783b077d0337117463f88a12bb2288 (patch)
tree0b700488477febfb022d1bccf448cce51b59c2d4 /scripts/vyatta-interfaces.pl
parentcc6a74dde28945cdc72ac4081500a05ad3805795 (diff)
downloadvyatta-cfg-bc9a250955783b077d0337117463f88a12bb2288.tar.gz
vyatta-cfg-bc9a250955783b077d0337117463f88a12bb2288.zip
Eliminate vestigates of watchlink
Watchlink is no longer used to manage link detection. This is now provided by kernel.
Diffstat (limited to 'scripts/vyatta-interfaces.pl')
-rwxr-xr-xscripts/vyatta-interfaces.pl28
1 files changed, 0 insertions, 28 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl
index 28b1c14..aa82b78 100755
--- a/scripts/vyatta-interfaces.pl
+++ b/scripts/vyatta-interfaces.pl
@@ -368,34 +368,6 @@ sub delete_eth_addrs {
or die "Could not exec ip?";
}
-
- # Destroy watchlink's internal status so it doesn't erronously
- # restore the address when link is restored
- my $statusfile = '/var/linkstatus/' . if_nametoindex($intf);
-
- # Use tie to treat file as array
- my $tie = tie my @status, 'Tie::File', $statusfile
- or die "can't open $statusfile";
-
- $tie->flock(LOCK_EX); # Block out watchlink
- $tie = undef; # Drop reference so untie will work
-
- my $ip = NetAddr::IP->new($addr);
- my $recno = 0;
- foreach my $line (@status) {
- chomp $line;
-
- # The format of watchlink file is host byte order (IPV6??)
- my ($ifindex, $raddr, $bcast, $prefix) = split (/,/, $line);
- my $laddr = htonl($raddr);
- my $this = NetAddr::IP->new("$laddr/$prefix");
- if ($ip eq $this) {
- splice @status, $recno, 1; # delete the line
- } else {
- $recno++;
- }
- }
- untie @status;
exit 0;
}