mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 10:40:30 +01: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:bfabfb05aeFixes:f09f5e1ec8(cherry picked from commit28938155e0)
This commit is contained in:
parent
4663d3ceac
commit
89e9d3e8df
2 changed files with 2 additions and 6 deletions
|
|
@ -1210,7 +1210,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 */
|
||||
|
|
@ -2198,8 +2198,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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1150,7 +1150,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
|
||||
|
|
@ -1886,8 +1886,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…
Add table
Reference in a new issue