summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-01-09 14:52:24 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-01-12 11:15:31 -0800
commit64d4f5736b9c8dfe2a516cd03a8699fe1463cff1 (patch)
treeba3272c8861bf16b99e292a2b2432380916233d8 /scripts
parent5a1dfa9b190f57cbda4e4af78fc8ba214f65c8d7 (diff)
downloadvyatta-cfg-64d4f5736b9c8dfe2a516cd03a8699fe1463cff1.tar.gz
vyatta-cfg-64d4f5736b9c8dfe2a516cd03a8699fe1463cff1.zip
Restore IPV6 addresses when interface re-enabled
Bugfix: 3696 Force restore of IPV6 addresses when interface is enabled
Diffstat (limited to 'scripts')
-rw-r--r--scripts/vyatta-interfaces.pl5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl
index 8614591..e890f9c 100644
--- a/scripts/vyatta-interfaces.pl
+++ b/scripts/vyatta-interfaces.pl
@@ -199,12 +199,13 @@ sub restore_ipv6_addr {
exit 1;
}
- foreach my $addr ($config->listNodes('address')) {
+ foreach my $addr ($config->returnValues('address')) {
next if ($addr eq 'dhcp');
my $version = is_ip_v4_or_v6($addr);
next unless $version;
next unless ($version == 6);
- system("ip -6 addr add $addr dev $intf");
+ system("sudo ip -6 addr add $addr dev $intf") == 0
+ or die "restoring $addr failed: $!\n";
}
}