mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 16:04:49 +00:00
bgpd: Respect bgp bestpath missing-as-worst
for table-map
as well
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
803ff41cc4
commit
fa8663141e
@ -649,7 +649,7 @@ static bool use_bgp_med_value(struct attr *attr, struct bgp *bgp)
|
||||
|
||||
/* Get MED value. If MED value is missing and "bgp bestpath
|
||||
missing-as-worst" is specified, treat it as the worst value. */
|
||||
static uint32_t bgp_med_value(struct attr *attr, struct bgp *bgp)
|
||||
uint32_t bgp_med_value(struct attr *attr, struct bgp *bgp)
|
||||
{
|
||||
if (CHECK_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_MULTI_EXIT_DISC)))
|
||||
return attr->med;
|
||||
|
@ -1012,4 +1012,5 @@ extern void bgp_meta_queue_free(struct meta_queue *mq);
|
||||
extern int early_route_process(struct bgp *bgp, struct bgp_dest *dest);
|
||||
extern int other_route_process(struct bgp *bgp, struct bgp_dest *dest);
|
||||
extern int eoiu_marker_process(struct bgp *bgp, struct bgp_dest *dest);
|
||||
extern uint32_t bgp_med_value(struct attr *attr, struct bgp *bgp);
|
||||
#endif /* _QUAGGA_BGP_ROUTE_H */
|
||||
|
@ -1339,7 +1339,7 @@ static void bgp_zebra_announce_parse_nexthop(
|
||||
* overridden on 1st nexthop */
|
||||
if (mpinfo == info) {
|
||||
if (metric)
|
||||
*metric = mpinfo_cp->attr->med;
|
||||
*metric = bgp_med_value(mpinfo_cp->attr, bgp);
|
||||
if (tag)
|
||||
*tag = mpinfo_cp->attr->tag;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user