diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2023-02-14 11:39:07 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2023-03-01 11:51:04 +0100 |
commit | 90ef7aeed39f27db204f5d4d43497bb693fc9f5e (patch) | |
tree | 7d423924e367e9eacbf9454cd2e6c497a8ae54da | |
parent | fcf2e40f5f8d125675e30ba5ed4783cb0d7cccf9 (diff) | |
download | NetworkManager-nm-1-36.tar.gz |
device: skip DNS resolution for tentative IPv6 addressesnm-1-36
A tentative IPv6 address can still fail DAD, so don't use it to
resolve the hostname via DNS. Furthermore, tentative addresses can't
be used to contact the nameserver and so the resolution will fail if
there is no other valid IPv6 address. Wait that the address becomes
non-tentative.
(cherry picked from commit 4138be6a5a508af66b3b79c0eaeb43e3437ee345)
(cherry picked from commit 0ebd75381963abc2fb75d39ab44367139db0e34b)
(cherry picked from commit 26d5ad46806a2dc69238116796be0fbb2b7c273f)
(cherry picked from commit 115634d3b13f8594d2fb523c3794cdbb2f5cfc74)
-rw-r--r-- | src/core/devices/nm-device.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 8a6f21ccc5..46ebafc302 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -16815,6 +16815,9 @@ get_address_for_hostname_dns_lookup(NMDevice *self, int addr_family) return g_inet_address_new_from_bytes(addr->address_ptr, G_SOCKET_FAMILY_IPV4); } + if (addr->n_ifa_flags & IFA_F_TENTATIVE) + continue; + /* For IPv6 prefer, in order: * - !link-local, !deprecated * - !link-local, deprecated |