]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Let's actually track if the nh was updated
authorDonald Sharp <sharpd@nvidia.com>
Fri, 4 Dec 2020 13:01:31 +0000 (08:01 -0500)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 9 Dec 2020 20:36:33 +0000 (23:36 +0300)
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>
bgpd/bgp_zebra.c

index a761cbcff24512716f5e3d95846cca4fe5d1acfe..9ce849427a6285e50b0422d0b159b14e4113ae2c 100644 (file)
@@ -1196,7 +1196,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;