mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-07 00:31:11 +00:00
core: don't include dns-priority in IP configuration hash
The DNS priority property of a IP configuration determines how the configuration compares to others when deciding their order, but doesn't specify directly parameters to be applied. In other words, two configurations which differs only for the dns-priority should have the same hash as applying them will give the same result. Especially, when the DNS manager computes the hash of IP configurations, the ones without real configuration data (servers, domans, options...) should not change the hash value. Thus, exclude the property from the hash computation and dowgrade any modification to 'minor change'. Fixes:bfabfb05ae
Fixes:f09f5e1ec8
This commit is contained in:
parent
04852d2877
commit
28938155e0
|
@ -1232,7 +1232,7 @@ nm_ip4_config_replace (NMIP4Config *dst, const NMIP4Config *src, gboolean *relev
|
|||
/* DNS priority */
|
||||
if (src_priv->dns_priority != dst_priv->dns_priority) {
|
||||
nm_ip4_config_set_dns_priority (dst, src_priv->dns_priority);
|
||||
has_relevant_changes = TRUE;
|
||||
has_minor_changes = TRUE;
|
||||
}
|
||||
|
||||
/* mss */
|
||||
|
@ -2220,8 +2220,6 @@ nm_ip4_config_hash (const NMIP4Config *config, GChecksum *sum, gboolean dns_only
|
|||
s = nm_ip4_config_get_dns_option (config, i);
|
||||
g_checksum_update (sum, (const guint8 *) s, strlen (s));
|
||||
}
|
||||
|
||||
hash_u32 (sum, (guint32) nm_ip4_config_get_dns_priority (config));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1172,7 +1172,7 @@ nm_ip6_config_replace (NMIP6Config *dst, const NMIP6Config *src, gboolean *relev
|
|||
/* DNS priority */
|
||||
if (src_priv->dns_priority != dst_priv->dns_priority) {
|
||||
nm_ip6_config_set_dns_priority (dst, src_priv->dns_priority);
|
||||
has_relevant_changes = TRUE;
|
||||
has_minor_changes = TRUE;
|
||||
}
|
||||
|
||||
#if NM_MORE_ASSERTS
|
||||
|
@ -1949,8 +1949,6 @@ nm_ip6_config_hash (const NMIP6Config *config, GChecksum *sum, gboolean dns_only
|
|||
s = nm_ip6_config_get_dns_option (config, i);
|
||||
g_checksum_update (sum, (const guint8 *) s, strlen (s));
|
||||
}
|
||||
|
||||
hash_u32 (sum, (guint32) nm_ip6_config_get_dns_priority (config));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue