]> git.puffer.fish Git - matthieu/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)
committerDonald Sharp <sharpd@nvidia.com>
Fri, 4 Dec 2020 13:01:31 +0000 (08:01 -0500)
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 12bc2e41bc36e14e9f8a6620311132a97367eb72..8d07e050f8647af2eedcbefc111406105998b363 100644 (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;