Skip to content

Commit

Permalink
Merge pull request #148 from sever-sever/T3394
Browse files Browse the repository at this point in the history
ipv6: T3394: Fix for del ipv6 address normalize
  • Loading branch information
c-po authored Nov 28, 2021
2 parents b96636b + c7f89a1 commit e966d33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/vyatta-address
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e966d33

Please sign in to comment.