Merge pull request #18581 from zmw12306/request_forward

babeld: Request forwarding does not prioritize feasible routes
This commit is contained in:
Russ White 2025-04-08 10:52:08 -04:00 committed by GitHub
commit 59b62ca788
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1933,8 +1933,14 @@ handle_request(struct neighbour *neigh, const unsigned char *prefix,
/* We were about to forward a request to its requestor. Try to
find a different neighbour to forward the request to. */
struct babel_route *other_route;
/* First try feasible routes as required by RFC */
other_route = find_best_route(prefix, plen, 1, neigh);
other_route = find_best_route(prefix, plen, 0, neigh);
if(!other_route || route_metric(other_route) >= INFINITY) {
/* If no feasible route found, try non-feasible routes */
other_route = find_best_route(prefix, plen, 0, neigh);
}
if(other_route && route_metric(other_route) < INFINITY)
successor = other_route->neigh;
}