diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2020-11-02 10:14:48 -0500 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2020-11-02 10:14:48 -0500 | 
| commit | 1ba8b2a8bf5d44a7423486a2f69c4f9866ba46d9 (patch) | |
| tree | b04763c26a04cbc40c6b4378c1b1de550ada40d2 /bgpd/bgp_mpath.c | |
| parent | 93ca501b61d924b662712ae4fc9273782e8f0396 (diff) | |
bgpd: Multipath is always being allocated
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>
Diffstat (limited to 'bgpd/bgp_mpath.c')
| -rw-r--r-- | bgpd/bgp_mpath.c | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c index b7f516eaf7..ff5cfe05fb 100644 --- a/bgpd/bgp_mpath.c +++ b/bgpd/bgp_mpath.c @@ -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;  | 
