diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2021-02-18 06:55:29 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2021-02-18 06:55:29 -0500 |
| commit | e817f2ccbf9e4173d1a2cf404fe0fd41d6cd9bcd (patch) | |
| tree | 010db142f25c2a1813b7f3231a2a3cdc75a9b142 | |
| parent | d30260ee9efa30d7aa72355fac5bc598acdab91a (diff) | |
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 <sharpd@nvidia.com>
| -rw-r--r-- | bgpd/bgp_nht.c | 2 |
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; |
