mirror of
https://github.com/systemd/systemd.git
synced 2026-08-04 15:10:33 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user