summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2022-08-01 20:53:02 +0200
committerThomas Haller <thaller@redhat.com>2022-08-09 08:02:37 +0200
commitf4b128c63bff29ee096ef6e09f49e6c0c7744d18 (patch)
tree2248eed2ebf0bdc07b52719a9fd381f20049374e
parent13d334cdbbc0f8140051c964b4075370fcb31b85 (diff)
downloadNetworkManager-f4b128c63bff29ee096ef6e09f49e6c0c7744d18.tar.gz
device: fix reapply for lldp/mdns/llmnr/dns-over-tls settings
When only one of those connection.{lldp,mdns,llmnr,dns-over-tls} settings changes, we still need to do a full restart of the IP configuration to reapply the changes. Fixes: 58287cbcc0c8 ('core: rework IP configuration in NetworkManager using layer 3 configuration')
-rw-r--r--src/core/devices/nm-device.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c
index 97dfe9ba97..676d08d983 100644
--- a/src/core/devices/nm-device.c
+++ b/src/core/devices/nm-device.c
@@ -12873,6 +12873,16 @@ check_and_reapply_connection(NMDevice *self,
if (nm_g_hash_table_lookup(diffs, NM_SETTING_IP6_CONFIG_SETTING_NAME))
priv->ip_data_6.do_reapply = TRUE;
+ if (nm_g_hash_table_contains_any(
+ nm_g_hash_table_lookup(diffs, NM_SETTING_CONNECTION_SETTING_NAME),
+ NM_SETTING_CONNECTION_LLDP,
+ NM_SETTING_CONNECTION_MDNS,
+ NM_SETTING_CONNECTION_LLMNR,
+ NM_SETTING_CONNECTION_DNS_OVER_TLS)) {
+ priv->ip_data_4.do_reapply = TRUE;
+ priv->ip_data_6.do_reapply = TRUE;
+ }
+
nm_device_activate_schedule_stage3_ip_config(self, FALSE);
_routing_rules_sync(self, NM_TERNARY_TRUE);