From: Yu Watanabe Date: Thu, 28 Nov 2024 19:14:56 +0000 (+0900) Subject: network/nexthop: ignore foreign nexthops when ManageForeignNextHops=no X-Git-Tag: v258-rc1~1883^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=290a507f7c56d11ddbe6138ae15246b2debf48dc;p=thirdparty%2Fsystemd.git network/nexthop: ignore foreign nexthops when ManageForeignNextHops=no --- diff --git a/src/network/networkd-nexthop.c b/src/network/networkd-nexthop.c index ab4bafba50d..e27ecf05f98 100644 --- a/src/network/networkd-nexthop.c +++ b/src/network/networkd-nexthop.c @@ -1144,6 +1144,11 @@ int manager_rtnl_process_nexthop(sd_netlink *rtnl, sd_netlink_message *message, /* If we did not know the nexthop, then save it. */ if (!nexthop) { + if (!req && !m->manage_foreign_nexthops) { + log_nexthop_debug(&(const NextHop) { .id = id }, "Ignoring received", m); + return 0; + } + r = nexthop_add_new(m, id, &nexthop); if (r < 0) { log_warning_errno(r, "Failed to add received nexthop, ignoring: %m");