From: Donald Sharp Date: Fri, 4 Dec 2020 13:01:31 +0000 (-0500) Subject: bgpd: Let's actually track if the nh was updated X-Git-Tag: base_7.6~157^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=06f16b2c253ff9d71db498e3a93a0d620434496c;p=matthieu%2Ffrr.git 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 --- 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;