From: noxiouz Date: Mon, 2 Mar 2026 22:42:16 +0000 (+0000) Subject: network: fix error aggregation in wwan_check_and_set_configuration() X-Git-Tag: v260-rc2~30 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fbf533859f312de19e25979ebf243d6929c00d1d;p=thirdparty%2Fsystemd.git network: fix error aggregation in wwan_check_and_set_configuration() When removing marked routes, the condition `if (ret)` incorrectly overwrites any previously accumulated error in `ret` with the latest return value `r`, even if `r >= 0` (success). This means an earlier real error can be silently cleared by a subsequent successful route_remove() call. The parallel address_remove() block just above uses the correct `if (r < 0)` pattern. Apply the same fix to the route_remove() block. --- diff --git a/src/network/networkd-wwan.c b/src/network/networkd-wwan.c index 325d2b02818..2b10eb3e4ee 100644 --- a/src/network/networkd-wwan.c +++ b/src/network/networkd-wwan.c @@ -529,7 +529,7 @@ static int link_apply_bearer_impl(Link *link, Bearer *b) { continue; r = route_remove(route, link->manager); - if (ret) + if (r < 0) ret = r; }