From 06f16b2c253ff9d71db498e3a93a0d620434496c Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 4 Dec 2020 08:01:31 -0500 Subject: [PATCH] bgpd: Let's actually track if the nh was updated In bgp_zebra_announce when iterating over multipath we were checking to ensure that the nexthop was updated but never initially clearing the nh_updated variable. Thus leading to a situation where we could crash. Signed-off-by: Donald Sharp --- bgpd/bgp_zebra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 12bc2e41bc..8d07e050f8 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -1176,7 +1176,7 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p, int nh_othervrf = 0; char buf_prefix[PREFIX_STRLEN]; /* filled in if we are debugging */ bool is_evpn; - int nh_updated; + bool nh_updated = false; bool do_wt_ecmp; uint64_t cum_bw = 0; uint32_t nhg_id = 0; -- 2.39.5