local-addresses: ignore tentative addresses

As tentative addresses may be dropped soon if DAD failed.
This commit is contained in:
Yu Watanabe
2024-01-20 16:07:19 +09:00
parent 5cb56068d0
commit e90863f231
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ int local_addresses(
r = sd_rtnl_message_addr_get_flags(m, &flags);
if (r < 0)
return r;
if (flags & IFA_F_DEPRECATED)
if ((flags & (IFA_F_DEPRECATED|IFA_F_TENTATIVE)) != 0)
continue;
if (!GREEDY_REALLOC0(list, n_list+1))
+2 -2
View File
@@ -56,7 +56,7 @@ ip addr add 10.2.0.2/24 dev ve-manyips
for i in {100..120}; do
ip addr add 10.2.0.$i/24 dev ve-manyips
done
ip addr add fd00:dead:beef:cafe::2/64 dev ve-manyips
ip addr add fd00:dead:beef:cafe::2/64 dev ve-manyips nodad
ip addr show dev ve-manyips
touch /initialized
sleep infinity
@@ -90,7 +90,7 @@ done
# getaddrinfo() return EAI_NONAME without ever asking nss-mymachines.
ip addr add 10.1.0.1/24 dev ve-singleip
ip addr add 10.2.0.1/24 dev ve-manyips
ip addr add fd00:dead:beef:cafe::1/64 dev ve-manyips
ip addr add fd00:dead:beef:cafe::1/64 dev ve-manyips nodad
getent hosts -s mymachines
getent ahosts -s mymachines