From 326882017876bc22f9d16508a44a8ef98a53d220 Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Wed, 29 May 2024 09:45:24 +0200 Subject: [PATCH] route: treat routes with via nexthops as universe scoped as well RTA_VIA is a RTA_GATEWAY with added address family, so we should treat them them equivalent for guessing the scope. Signed-off-by: Jonas Gorski https://github.com/thom311/libnl/pull/389 Conflict:NA Reference:https://github.com/thom311/libnl/commit/326882017876bc22f9d16508a44a8ef98a53d220 --- lib/route/route_obj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/route/route_obj.c b/lib/route/route_obj.c index 0ae029d..2d4a4b8 100644 --- a/lib/route/route_obj.c +++ b/lib/route/route_obj.c @@ -983,7 +983,7 @@ int rtnl_route_guess_scope(struct rtnl_route *route) * is not directly connected */ nl_list_for_each_entry(nh, &route->rt_nexthops, rtnh_list) { - if (nh->rtnh_gateway) + if (nh->rtnh_gateway || nh->rtnh_via) return RT_SCOPE_UNIVERSE; } } -- 2.33.0