diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2024-12-11 07:20:27 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-11 07:20:27 -0500 |
| commit | 81e82659695b6496a935a9064294657ceb62c204 (patch) | |
| tree | 986c5c79fb1c71a966303cbaa7d28288dde832a9 | |
| parent | a9dbbfeb1d578d87f5771f223311737a1a8f3fae (diff) | |
| parent | 4eb591381ac2995cd651c6be78593950dcaeaa8f (diff) | |
Merge pull request #17633 from opensourcerouting/fix/backport_9b0b9282d317a9aeab36d9a8b08a35fe9a172c4b_9.1
bgpd: Fix bgp core with a possible Intf delete (backport)
| -rw-r--r-- | bgpd/bgp_zebra.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 478289ae88..bcec12051e 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -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) - ifindex = pi->peer->ifp->ifindex; - else if (pi->peer->ifname) + if (pi->peer->conf_if) { + if (pi->peer->ifp) + ifindex = pi->peer->ifp->ifindex; + } else if (pi->peer->ifname) ifindex = ifname2ifindex( pi->peer->ifname, pi->peer->bgp->vrf_id); |
