summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2021-02-18 10:31:04 -0500
committerGitHub <noreply@github.com>2021-02-18 10:31:04 -0500
commit1d73eba70d7884319b7cad06e391e399b9e81b0e (patch)
tree010db142f25c2a1813b7f3231a2a3cdc75a9b142
parentd30260ee9efa30d7aa72355fac5bc598acdab91a (diff)
parente817f2ccbf9e4173d1a2cf404fe0fd41d6cd9bcd (diff)
Merge pull request #8106 from donaldsharp/fix_bad_interaction
bgpd: Fix crash when we don't have a nexthop
-rw-r--r--bgpd/bgp_nht.c2
1 files changed, 1 insertions, 1 deletions
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;