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 <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2020-12-04 08:01:31 -05:00
parent 057edd2e84
commit 06f16b2c25

View file

@ -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;