summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_mpath.c4
-rw-r--r--bgpd/bgp_mpath.h9
2 files changed, 10 insertions, 3 deletions
diff --git a/bgpd/bgp_mpath.c b/bgpd/bgp_mpath.c
index 3421b00ba7..3b8b274556 100644
--- a/bgpd/bgp_mpath.c
+++ b/bgpd/bgp_mpath.c
@@ -411,6 +411,10 @@ static void bgp_path_info_mpath_count_set(struct bgp_path_info *path,
* bgp_path_info_mpath_lb_update
*
* Update cumulative info related to link-bandwidth
+ *
+ * This is only set on the first mpath of the list
+ * as such we should UNSET the flags when removing
+ * to ensure nothing accidently happens
*/
static void bgp_path_info_mpath_lb_update(struct bgp_path_info *path, bool set,
bool all_paths_lb, uint64_t cum_bw)
diff --git a/bgpd/bgp_mpath.h b/bgpd/bgp_mpath.h
index 129682d1dc..267d729e06 100644
--- a/bgpd/bgp_mpath.h
+++ b/bgpd/bgp_mpath.h
@@ -25,15 +25,18 @@ struct bgp_path_info_mpath {
/* When attached to best path, the number of selected multipaths */
uint16_t mp_count;
- /* Flags - relevant as noted. */
+ /* Flags - relevant as noted, attached to bestpath. */
uint16_t mp_flags;
#define BGP_MP_LB_PRESENT 0x1 /* Link-bandwidth present for >= 1 path */
#define BGP_MP_LB_ALL 0x2 /* Link-bandwidth present for all multipaths */
- /* Aggregated attribute for advertising multipath route */
+ /*
+ * Aggregated attribute for advertising multipath route,
+ * attached to bestpath
+ */
struct attr *mp_attr;
- /* Cumulative bandiwdth of all multipaths - attached to best path. */
+ /* Cumulative bandiwdth of all multipaths - attached to bestpath. */
uint64_t cum_bw;
};