]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: make IPv6 routes with reject type managed by Manager
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 3 Dec 2020 09:51:53 +0000 (18:51 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 4 Dec 2020 02:23:23 +0000 (11:23 +0900)
src/network/networkd-route.c

index 5018fe480b6aed7ac02321274da409ddb4aa5268..280c1ee92cb1ba726cf4f2dd0759ae61ce3e8463 100644 (file)
@@ -1582,6 +1582,12 @@ int manager_rtnl_process_route(sd_netlink *rtnl, sd_netlink_message *message, Ma
                 }
         }
 
+        /* IPv6 routes with reject type are always assigned to the loopback interface. See kernel's
+         * fib6_nh_init() in net/ipv6/route.c. However, we'd like to manage them by Manager. Hence, set
+         * link to NULL here. */
+        if (route_type_is_reject(tmp))
+                link = NULL;
+
         if (ordered_set_isempty(multipath_routes))
                 (void) process_route_one(m, link, type, tmp, NULL);
         else {