diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2017-01-09 17:57:45 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2017-01-10 15:39:15 +0100 |
commit | 1dbd9d7948e61f44a56e256c4d9fe60831663861 (patch) | |
tree | 199477ec87237743161a06df38e24b42029e3cae | |
parent | 6eb2d60fbeda4987bb5b3ebf4588d94fdea89ef0 (diff) |
platform: don't update IPv6 temporary addresses
The kernel already takes care of adding and updating temporary
addresses when an address with IFA_F_MANAGETEMPADDR flag is added or
updated; doing it also in nm_platform_ip6_address_sync() can overwrite
the changes done by kernel, especially because since commit
0a0bca9c7fad ("ip6-config: sort addresses only when reading the
property value") there is no guarantee that temporary addresses are
before the public ones in the IPv6 configuration.
Still delete temporary addresses, but don't add or update them.
-rw-r--r-- | src/platform/nm-platform.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c index 9d972a5897..0b23b67f14 100644 --- a/src/platform/nm-platform.c +++ b/src/platform/nm-platform.c @@ -3016,6 +3016,11 @@ nm_platform_ip6_address_sync (NMPlatform *self, int ifindex, const GArray *known const NMPlatformIP6Address *known_address = &g_array_index (known_addresses, NMPlatformIP6Address, i); guint32 lifetime, preferred; + if (NM_FLAGS_HAS (known_address->n_ifa_flags, IFA_F_TEMPORARY)) { + /* Kernel manages these */ + continue; + } + if (!nm_utils_lifetime_get (known_address->timestamp, known_address->lifetime, known_address->preferred, now, &lifetime, &preferred)) continue; |