mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 21:47:15 +02:00
Merge pull request #14218 from Pdoijode/pdoijode/frr-bgp-nexthop-find-fix
bgpd: Set ifindex to find the correct nexthop
This commit is contained in:
commit
d50812edb0
|
@ -316,6 +316,14 @@ int bgp_find_or_add_nexthop(struct bgp *bgp_route, struct bgp *bgp_nexthop,
|
|||
if (make_prefix(afi, pi, &p) < 0)
|
||||
return 1;
|
||||
|
||||
/*
|
||||
* If path is learnt from an interface based peer,
|
||||
* set the ifindex to peer's interface index so that
|
||||
* correct nexthop can be found in nexthop tree.
|
||||
*/
|
||||
if (pi->peer->conf_if)
|
||||
ifindex = pi->peer->su.sin6.sin6_scope_id;
|
||||
|
||||
if (!is_bgp_static_route && orig_prefix
|
||||
&& prefix_same(&p, orig_prefix)) {
|
||||
if (BGP_DEBUG(nht, NHT)) {
|
||||
|
|
Loading…
Reference in a new issue