mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-26 04:54:44 +00:00
bgpd: Both possible paths unset a flag, so reduce
Both paths through the code unset a flag, so reduce the duplication. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
b56758dae8
commit
4d307c9914
@ -2866,9 +2866,10 @@ void bgp_best_selection(struct bgp *bgp, struct bgp_dest *dest,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CHECK_FLAG(bgp->flags, BGP_FLAG_DETERMINISTIC_MED)
|
bgp_path_info_unset_flag(dest, pi, BGP_PATH_DMED_CHECK);
|
||||||
&& (!CHECK_FLAG(pi->flags, BGP_PATH_DMED_SELECTED))) {
|
|
||||||
bgp_path_info_unset_flag(dest, pi, BGP_PATH_DMED_CHECK);
|
if (CHECK_FLAG(bgp->flags, BGP_FLAG_DETERMINISTIC_MED) &&
|
||||||
|
(!CHECK_FLAG(pi->flags, BGP_PATH_DMED_SELECTED))) {
|
||||||
if (debug)
|
if (debug)
|
||||||
zlog_debug("%s: %pBD(%s) pi %s dmed", __func__,
|
zlog_debug("%s: %pBD(%s) pi %s dmed", __func__,
|
||||||
dest, bgp->name_pretty,
|
dest, bgp->name_pretty,
|
||||||
@ -2876,8 +2877,6 @@ void bgp_best_selection(struct bgp *bgp, struct bgp_dest *dest,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
bgp_path_info_unset_flag(dest, pi, BGP_PATH_DMED_CHECK);
|
|
||||||
|
|
||||||
reason = dest->reason;
|
reason = dest->reason;
|
||||||
if (bgp_path_info_cmp(bgp, pi, new_select, &paths_eq, mpath_cfg,
|
if (bgp_path_info_cmp(bgp, pi, new_select, &paths_eq, mpath_cfg,
|
||||||
debug, pfx_buf, afi, safi,
|
debug, pfx_buf, afi, safi,
|
||||||
|
Loading…
Reference in New Issue
Block a user