]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Multipath is always being allocated
authorDonald Sharp <sharpd@nvidia.com>
Mon, 2 Nov 2020 15:14:48 +0000 (10:14 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 2 Nov 2020 15:14:48 +0000 (10:14 -0500)
The multipath arrays are always being allocated, irrelevant
if we actually have multipath information for a prefix.

This is because the link bandwidth code was always adding the
data structure.  We should not be allocated multipath information
unless we actually have multipath information

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd/bgp_mpath.c

index b7f516eaf7893d077d0e29e7ca064a72f89e94de..ff5cfe05fbe80c53e544c3a489b31ecb96b83e06 100644 (file)
@@ -412,8 +412,9 @@ static void bgp_path_info_mpath_lb_update(struct bgp_path_info *path, bool set,
        struct bgp_path_info_mpath *mpath;
 
        if ((mpath = path->mpath) == NULL) {
-               if (!set)
+               if (!set || (cum_bw == 0 && !all_paths_lb))
                        return;
+
                mpath = bgp_path_info_mpath_get(path);
                if (!mpath)
                        return;