From 7d8e43df942cf38bdd40f17b768d9c0a1cbd4e52 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 1 Aug 2022 20:53:02 +0200 Subject: [PATCH] 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') (cherry picked from commit f4b128c63bff29ee096ef6e09f49e6c0c7744d18) (cherry picked from commit 6eaee2b13f012213376dc9d91fa28f197a07c2ce) --- src/core/devices/nm-device.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 1ff37cc9c3..79cc52e984 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -12691,6 +12691,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);