From 64d4f5736b9c8dfe2a516cd03a8699fe1463cff1 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 9 Jan 2009 14:52:24 -0800 Subject: Restore IPV6 addresses when interface re-enabled Bugfix: 3696 Force restore of IPV6 addresses when interface is enabled --- scripts/vyatta-interfaces.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts') 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"; } } -- cgit v1.2.3