mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 00:40:08 +01:00
core: fix emitting changed notification during nm_ip4_config_intersect()
This commit is contained in:
parent
d95df1cef0
commit
eba646ec42
1 changed files with 9 additions and 0 deletions
|
|
@ -1408,6 +1408,7 @@ nm_ip4_config_intersect (NMIP4Config *dst, const NMIP4Config *src)
|
|||
NMDedupMultiIter ipconf_iter;
|
||||
const NMPlatformIP4Address *a;
|
||||
const NMPlatformIP4Route *r;
|
||||
gboolean changed;
|
||||
|
||||
g_return_if_fail (src);
|
||||
g_return_if_fail (dst);
|
||||
|
|
@ -1418,6 +1419,7 @@ nm_ip4_config_intersect (NMIP4Config *dst, const NMIP4Config *src)
|
|||
src_priv = NM_IP4_CONFIG_GET_PRIVATE (src);
|
||||
|
||||
/* addresses */
|
||||
changed = FALSE;
|
||||
nm_ip_config_iter_ip4_address_for_each (&ipconf_iter, dst, &a) {
|
||||
if (nm_dedup_multi_index_lookup_obj (src_priv->multi_idx,
|
||||
&src_priv->idx_ip4_addresses,
|
||||
|
|
@ -1427,7 +1429,10 @@ nm_ip4_config_intersect (NMIP4Config *dst, const NMIP4Config *src)
|
|||
if (nm_dedup_multi_index_remove_entry (dst_priv->multi_idx,
|
||||
ipconf_iter.current) != 1)
|
||||
nm_assert_not_reached ();
|
||||
changed = TRUE;
|
||||
}
|
||||
if (changed)
|
||||
_notify_addresses (dst);
|
||||
|
||||
/* ignore route_metric */
|
||||
/* ignore nameservers */
|
||||
|
|
@ -1440,6 +1445,7 @@ nm_ip4_config_intersect (NMIP4Config *dst, const NMIP4Config *src)
|
|||
}
|
||||
|
||||
/* routes */
|
||||
changed = FALSE;
|
||||
nm_ip_config_iter_ip4_route_for_each (&ipconf_iter, dst, &r) {
|
||||
if (nm_dedup_multi_index_lookup_obj (src_priv->multi_idx,
|
||||
&src_priv->idx_ip4_routes,
|
||||
|
|
@ -1449,7 +1455,10 @@ nm_ip4_config_intersect (NMIP4Config *dst, const NMIP4Config *src)
|
|||
if (nm_dedup_multi_index_remove_entry (dst_priv->multi_idx,
|
||||
ipconf_iter.current) != 1)
|
||||
nm_assert_not_reached ();
|
||||
changed = TRUE;
|
||||
}
|
||||
if (changed)
|
||||
_notify_routes (dst);
|
||||
|
||||
/* ignore domains */
|
||||
/* ignore dns searches */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue