From: Yu Watanabe Date: Wed, 20 Nov 2024 17:09:08 +0000 (+0900) Subject: network/nexthop: drop outdated comment and add one debugging log X-Git-Tag: v258-rc1~1883^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=724a296b4f62666f631040f311ed9874e35acb12;p=thirdparty%2Fsystemd.git network/nexthop: drop outdated comment and add one debugging log All NextHop objects are managed by Manager since 352eba2e49453a1b784ffbdb9509ba3f8a945b59. --- diff --git a/src/network/networkd-nexthop.c b/src/network/networkd-nexthop.c index 8e101ad779b..ab4bafba50d 100644 --- a/src/network/networkd-nexthop.c +++ b/src/network/networkd-nexthop.c @@ -1199,10 +1199,12 @@ int manager_rtnl_process_nexthop(sd_netlink *rtnl, sd_netlink_message *message, else nexthop->ifindex = (int) ifindex; - /* All blackhole or group nexthops are managed by Manager. Note that the linux kernel does not - * set NHA_OID attribute when NHA_BLACKHOLE or NHA_GROUP is set. Just for safety. */ - if (!nexthop_bound_to_link(nexthop)) + /* The linux kernel does not set NHA_OID attribute when NHA_BLACKHOLE or NHA_GROUP is set. + * But let's check that for safety. */ + if (!nexthop_bound_to_link(nexthop) && nexthop->ifindex != 0) { + log_debug("rtnl: received blackhole or group nexthop with NHA_OIF attribute, ignoring the attribute."); nexthop->ifindex = 0; + } nexthop_enter_configured(nexthop); if (req)