Filter out temporary addresses
Some IPv6 addresses are temporary and are generated by IPv6 privacy extensions. They eventually expire and are regenerated, so we should filter them out. Change-Id: I916d6a335bab096f765ae8c7e0e540a4349dd15f Closes-Bug: #1488691
This commit is contained in:
parent
ca802bcfcc
commit
d20435bdd4
@ -591,7 +591,7 @@ function get_default_host_ip {
|
|||||||
host_ip=""
|
host_ip=""
|
||||||
# Find the interface used for the default route
|
# Find the interface used for the default route
|
||||||
host_ip_iface=${host_ip_iface:-$(ip -f $af route | awk '/default/ {print $5}' | head -1)}
|
host_ip_iface=${host_ip_iface:-$(ip -f $af route | awk '/default/ {print $5}' | head -1)}
|
||||||
local host_ips=$(LC_ALL=C ip -f $af addr show ${host_ip_iface} | awk /$af'/ {split($2,parts,"/"); print parts[1]}')
|
local host_ips=$(LC_ALL=C ip -f $af addr show ${host_ip_iface} | sed /temporary/d |awk /$af'/ {split($2,parts,"/"); print parts[1]}')
|
||||||
local ip
|
local ip
|
||||||
for ip in $host_ips; do
|
for ip in $host_ips; do
|
||||||
# Attempt to filter out IP addresses that are part of the fixed and
|
# Attempt to filter out IP addresses that are part of the fixed and
|
||||||
|
Loading…
Reference in New Issue
Block a user