From: Donald Sharp Date: Thu, 18 Feb 2021 11:55:29 +0000 (-0500) Subject: bgpd: Fix crash when we don't have a nexthop X-Git-Tag: frr-7.5.1~6^2~5 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=f5d1dc55ed8c785699eccd076679a5ad8dd073ca;p=matthieu%2Ffrr.git bgpd: Fix crash when we don't have a nexthop Recent changes to allow bgpd to handle v6 LL slightly differently in the nexthop tracking code has not interacted well with the blackhole nexthop change for peers. Modify the code to do the right thing Signed-off-by: Donald Sharp --- diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index af7302b750..2c70d01d46 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -838,7 +838,7 @@ static void evaluate_paths(struct bgp_nexthop_cache *bnc) /* * Peering cannot occur across a blackhole nexthop */ - if (bnc->nexthop_num == 1 + if (bnc->nexthop_num == 1 && bnc->nexthop && bnc->nexthop->type == NEXTHOP_TYPE_BLACKHOLE) { peer->last_reset = PEER_DOWN_WAITING_NHT; valid_nexthops = 0;