Merge pull request #17633 from opensourcerouting/fix/backport_9b0b9282d317a9aeab36d9a8b08a35fe9a172c4b_9.1

bgpd: Fix bgp core with a possible Intf delete (backport)
This commit is contained in:
Donald Sharp 2024-12-11 07:20:27 -05:00 committed by GitHub
commit 81e8265969
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1179,9 +1179,10 @@ static bool update_ipv6nh_for_route_install(int nh_othervrf, struct bgp *nh_bgp,
ifindex =
pi->peer->nexthop.ifp->ifindex;
if (!ifindex) {
if (pi->peer->conf_if)
if (pi->peer->conf_if) {
if (pi->peer->ifp)
ifindex = pi->peer->ifp->ifindex;
else if (pi->peer->ifname)
} else if (pi->peer->ifname)
ifindex = ifname2ifindex(
pi->peer->ifname,
pi->peer->bgp->vrf_id);