From 05efd5ab62b8bb7534e0302c1ccf34b3b8456b33 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 29 Jan 2025 21:25:48 +0100 Subject: [PATCH] l3cfg: add the DNS routing rules explicitly Add the DNS routing rules explicitly instead of tracking them via the NMGlobalTracker mechanism. Since we do not plan to ever remove them, there is no reason to track the rules. Also, the current implementation is buggy because in some situations the rules are wrongly removed when they should not. Fixes: bf3ecd9031f0 ('l3cfg: fix DNS routes') https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2125 --- src/core/nm-l3cfg.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/core/nm-l3cfg.c b/src/core/nm-l3cfg.c index 376281935..fb48b860b 100644 --- a/src/core/nm-l3cfg.c +++ b/src/core/nm-l3cfg.c @@ -4079,10 +4079,7 @@ _l3cfg_routed_dns_apply(NML3Cfg *self, const NML3ConfigData *l3cd) NMP_CACHE_ID_TYPE_OBJECT_TYPE, &rule_obj)) { _LOGT("adding rule to DNS routing table"); - nmp_global_tracker_track_rule(self->priv.global_tracker, &rule, 10, self, NULL); - nmp_global_tracker_sync(self->priv.global_tracker, - NMP_OBJECT_TYPE_ROUTING_RULE, - TRUE); + nm_platform_routing_rule_add(self->priv.platform, NMP_NLM_FLAG_ADD, &rule); } }