]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network/route: ignore EEXIST reply when the corresponding request is already detached
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 5 Sep 2024 23:58:18 +0000 (08:58 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 6 Sep 2024 07:07:25 +0000 (16:07 +0900)
Follow-ups for db8dc7c1dd7f4620e14fbc4c1560a68a1fc9b85b.
Fixes #34275.

src/network/networkd-route.c

index 23adefc66a4aff28d574a371e0242fe880dae8e5..4ed2c53888ef28d56b4440d43141086e9837bd55 100644 (file)
@@ -719,6 +719,13 @@ static int route_update_on_existing(Request *req) {
         Route *rt = ASSERT_PTR(ASSERT_PTR(req)->userdata);
         int r;
 
+        if (!req->manager)
+                /* Already detached? At least there are two posibilities then.
+                 * 1) The interface is removed, and all queued requests for the interface are cancelled.
+                 * 2) networkd is now stopping, hence all queued requests are cancelled.
+                 * Anyway, we can ignore the request, and there is nothing we can do. */
+                return 0;
+
         if (rt->family == AF_INET || ordered_set_isempty(rt->nexthops))
                 return route_update_on_existing_one(req, rt);