diff options
author | rbalocca <rbalocca@vyatta.com> | 2008-04-26 10:58:47 -0700 |
---|---|---|
committer | rbalocca <rbalocca@vyatta.com> | 2008-04-26 10:58:47 -0700 |
commit | dc9a3772e2e74b94e9026e371af493004a4c7feb (patch) | |
tree | a219bdead1e1c72568ea5bdc7e0c98174f3f8adf /scripts/vyatta-interfaces.pl | |
parent | 7cb99a90634ed0685eac3a61b7c3cfcd274d8fe1 (diff) | |
parent | 4eb7f7ce4b1628192a0535e8d642e21d4aa39838 (diff) | |
download | vyatta-cfg-dc9a3772e2e74b94e9026e371af493004a4c7feb.tar.gz vyatta-cfg-dc9a3772e2e74b94e9026e371af493004a4c7feb.zip |
Merge branch 'glendale' into hollywood
Diffstat (limited to 'scripts/vyatta-interfaces.pl')
-rwxr-xr-x | scripts/vyatta-interfaces.pl | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index abbf6a8..aa82b78 100755 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -319,10 +319,7 @@ sub update_eth_addrs { } if ($version == 4) { - # revert this gruesome hack when quagga static route initialization - # is fixed. - #return system("ip addr add $addr broadcast + dev $intf"); - return system("ip link set $intf down; ip link set $intf up; ip addr add $addr broadcast + dev $intf"); + return system("ip addr add $addr broadcast + dev $intf"); } if ($version == 6) { return system("ip -6 addr add $addr dev $intf"); @@ -371,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; } |