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: base_8.0~369^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=e817f2ccbf9e4173d1a2cf404fe0fd41d6cd9bcd;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 3563f7e1a2..c6fa37fa8d 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -970,7 +970,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;