mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-29 21:50:45 +02:00
core: fix detection of relevant changes in nm_ipX_config_replace()
The @relevant_changes output value must match the result of !nm_ipX_config_equal(), so route metric and gateway must be taken into account too. Fixes:935411e5c0Fixes:cfd1851c00https://bugzilla.redhat.com/show_bug.cgi?id=1471244
This commit is contained in:
parent
5aa22ed8c9
commit
8469d77e2b
2 changed files with 6 additions and 2 deletions
|
|
@ -1313,7 +1313,9 @@ nm_ip4_config_replace (NMIP4Config *dst, const NMIP4Config *src, gboolean *relev
|
|||
|
||||
if (nm_platform_ip4_route_cmp (r_src, r_dst) != 0) {
|
||||
are_equal = FALSE;
|
||||
if (!nm_ip_config_obj_id_equal_ip4_route (r_src, r_dst)) {
|
||||
if ( !nm_ip_config_obj_id_equal_ip4_route (r_src, r_dst)
|
||||
|| r_src->gateway != r_dst->gateway
|
||||
|| r_src->metric != r_dst->metric) {
|
||||
has_relevant_changes = TRUE;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1193,7 +1193,9 @@ nm_ip6_config_replace (NMIP6Config *dst, const NMIP6Config *src, gboolean *relev
|
|||
|
||||
if (nm_platform_ip6_route_cmp (r_src, r_dst) != 0) {
|
||||
are_equal = FALSE;
|
||||
if (!nm_ip_config_obj_id_equal_ip6_route (r_src, r_dst)) {
|
||||
if ( !nm_ip_config_obj_id_equal_ip6_route (r_src, r_dst)
|
||||
|| r_src->metric != r_dst->metric
|
||||
|| !IN6_ARE_ADDR_EQUAL (&r_src->gateway, &r_dst->gateway)) {
|
||||
has_relevant_changes = TRUE;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue