summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsever-sever <v.gletenko@vyos.io>2021-05-19 16:18:12 +0000
committersever-sever <v.gletenko@vyos.io>2021-05-19 16:18:12 +0000
commitc7f89a15707dec6cee75d2697bb76e9ab23345a8 (patch)
tree58a74ded31f14c39da28914995feb4d832fc377e
parent165e56e88763c40f13e6ef77f5df1c888fdfb899 (diff)
downloadvyatta-cfg-system-c7f89a15707dec6cee75d2697bb76e9ab23345a8.tar.gz
vyatta-cfg-system-c7f89a15707dec6cee75d2697bb76e9ab23345a8.zip
ipv6: T3394: Fix for del ipv6 address normalize
-rwxr-xr-xscripts/vyatta-address5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/vyatta-address b/scripts/vyatta-address
index ed9a298e..c3777579 100755
--- a/scripts/vyatta-address
+++ b/scripts/vyatta-address
@@ -35,7 +35,10 @@ case $1 in
ip_address=$(ip a s dev $2 | grep "inet $ip" | awk '{print $2}')
elif [[ "$3" = "dhcpv6" ]]; then
lease_file=/var/lib/dhcp/dhclient_v6_"$(echo $2 | sed -e 's/\./_/')".leases;
- ip_address=$(sed -n 's/^\s\s\s\siaaddr\s\(.*\)\s{/\1/p' $lease_file | sed -n '$p');
+ #ip_address=$(sed -n 's/^\s\s\s\siaaddr\s\(.*\)\s{/\1/p' $lease_file | sed -n '$p');
+ # T1053 T3394 we need IP/prefix for normalize-ip to function
+ ipv6=$(sed -n 's/^\s\s\s\siaaddr\s\(.*\)\s{/\1/p' $lease_file | sed -n '$p');
+ ip_address=$(ip -6 a s dev $2 | grep "inet6 $ipv6" | awk '{print $2}')
else
ip_address=$3;
fi