]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Fix crash when we don't have a nexthop
authorDonald Sharp <sharpd@nvidia.com>
Thu, 18 Feb 2021 11:55:29 +0000 (06:55 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 18 Feb 2021 11:55:29 +0000 (06:55 -0500)
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>
bgpd/bgp_nht.c

index 3563f7e1a20026b0df69be107d78ebd20cb8bd2f..c6fa37fa8da0440d2e3a52325b2497b10ad35f9f 100644 (file)
@@ -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;