From 87b81528a89b40a1fd953256d17b43570b3c0746 Mon Sep 17 00:00:00 2001 From: elysia090 <148540043+elysia090@users.noreply.github.com> Date: Mon, 1 Jun 2026 12:29:58 +0900 Subject: [PATCH] resolved: process networkd events before RTNL updates resolved watches networkd state changes and RTNL updates separately. RTNL is currently processed at SD_EVENT_PRIORITY_IMPORTANT, while networkd state changes are processed later at SD_EVENT_PRIORITY_IMPORTANT+5. If both are pending, an RTM_NEWADDR update can make a link relevant for LLMNR/mDNS scope allocation before resolved has consumed the corresponding networkd state update. This can let scope recalculation use stale per-link settings until the networkd event is processed. Run the networkd monitor source before RTNL by using SD_EVENT_PRIORITY_IMPORTANT-5. This lets resolved consume current link settings before reacting to RTNL address updates in the same event loop iteration. Fixes #42079 Co-developed-by: OpenAI Codex --- src/resolve/resolved-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c index add4f64910..29a7046be3 100644 --- a/src/resolve/resolved-manager.c +++ b/src/resolve/resolved-manager.c @@ -369,7 +369,7 @@ static int manager_network_monitor_listen(Manager *m) { if (r < 0) return r; - r = sd_event_source_set_priority(m->network_event_source, SD_EVENT_PRIORITY_IMPORTANT+5); + r = sd_event_source_set_priority(m->network_event_source, SD_EVENT_PRIORITY_IMPORTANT-5); if (r < 0) return r;