summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2024-12-11 07:20:36 -0500
committerGitHub <noreply@github.com>2024-12-11 07:20:36 -0500
commit5af15b0f0f36b5e18cdd61adb8d75f7c2262ce43 (patch)
tree7c1b2eea7f5b2b28ba24c6c99842bf3f11169444
parente11efcd7b8151fbdb9191aef0eb0844075ff2254 (diff)
parent9c20cd200b40236ce2a24bc4d91846226de696ae (diff)
Merge pull request #17632 from opensourcerouting/fix/backport_9b0b9282d317a9aeab36d9a8b08a35fe9a172c4b_10.0
bgpd: Fix bgp core with a possible Intf delete (backport)
-rw-r--r--bgpd/bgp_zebra.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index ebd20c5bfe..a64eb35591 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -1166,9 +1166,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);