core: avoid IFA_F_TEMPORARY alias for IFA_F_SECONDARY

IFA_F_SECONDARY and IFA_F_TEMPORARY have the same numerical values,
and are synonymous. Consistently use IFA_F_SECONDARY.
This commit is contained in:
Thomas Haller
2018-02-02 12:07:17 +01:00
parent b680cdd063
commit 8b4f119272
2 changed files with 5 additions and 5 deletions

View File

@@ -268,19 +268,19 @@ _addresses_sort_cmp (const NMPlatformIP6Address *a1,
if (p1 != p2)
return p1 > p2 ? -1 : 1;
ipv6_privacy1 = !!(a1->n_ifa_flags & (IFA_F_MANAGETEMPADDR | IFA_F_TEMPORARY));
ipv6_privacy2 = !!(a2->n_ifa_flags & (IFA_F_MANAGETEMPADDR | IFA_F_TEMPORARY));
ipv6_privacy1 = !!(a1->n_ifa_flags & (IFA_F_MANAGETEMPADDR | IFA_F_SECONDARY));
ipv6_privacy2 = !!(a2->n_ifa_flags & (IFA_F_MANAGETEMPADDR | IFA_F_SECONDARY));
if (ipv6_privacy1 || ipv6_privacy2) {
gboolean public1 = TRUE, public2 = TRUE;
if (ipv6_privacy1) {
if (a1->n_ifa_flags & IFA_F_TEMPORARY)
if (a1->n_ifa_flags & IFA_F_SECONDARY)
public1 = prefer_temp;
else
public1 = !prefer_temp;
}
if (ipv6_privacy2) {
if (a2->n_ifa_flags & IFA_F_TEMPORARY)
if (a2->n_ifa_flags & IFA_F_SECONDARY)
public2 = prefer_temp;
else
public2 = !prefer_temp;

View File

@@ -3556,7 +3556,7 @@ nm_platform_ip6_address_sync (NMPlatform *self,
const NMPlatformIP6Address *known_address = NMP_OBJECT_CAST_IP6_ADDRESS (known_addresses->pdata[i]);
guint32 lifetime, preferred;
if (NM_FLAGS_HAS (known_address->n_ifa_flags, IFA_F_TEMPORARY)) {
if (NM_FLAGS_HAS (known_address->n_ifa_flags, IFA_F_SECONDARY)) {
/* Kernel manages these */
continue;
}