forked from Mirror/frr
Merge pull request #15782 from opensourcerouting/fix/drop_srte_color_flag
bgpd: Drop SRTE_COLOR attribute flag
This commit is contained in:
commit
1a9c3a710d
|
@ -517,11 +517,9 @@ static inline void bgp_attr_set_ecommunity(struct attr *attr,
|
|||
{
|
||||
attr->ecommunity = ecomm;
|
||||
|
||||
if (ecomm) {
|
||||
if (ecomm)
|
||||
SET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES));
|
||||
if (ecommunity_select_color(ecomm))
|
||||
SET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_SRTE_COLOR));
|
||||
} else
|
||||
else
|
||||
UNSET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES));
|
||||
}
|
||||
|
||||
|
|
|
@ -357,9 +357,7 @@ int bgp_find_or_add_nexthop(struct bgp *bgp_route, struct bgp *bgp_nexthop,
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (CHECK_FLAG(pi->attr->flag,
|
||||
ATTR_FLAG_BIT(BGP_ATTR_SRTE_COLOR)))
|
||||
srte_color = bgp_attr_get_color(pi->attr);
|
||||
srte_color = bgp_attr_get_color(pi->attr);
|
||||
|
||||
} else if (peer) {
|
||||
/*
|
||||
|
|
|
@ -1944,7 +1944,6 @@ route_set_srte_color(void *rule, const struct prefix *prefix, void *object)
|
|||
path = object;
|
||||
|
||||
path->attr->srte_color = *srte_color;
|
||||
path->attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_SRTE_COLOR);
|
||||
|
||||
return RMAP_OKAY;
|
||||
}
|
||||
|
@ -3338,13 +3337,8 @@ static enum route_map_cmd_result_t
|
|||
route_set_ecommunity_color(void *rule, const struct prefix *prefix,
|
||||
void *object)
|
||||
{
|
||||
struct bgp_path_info *path;
|
||||
|
||||
path = object;
|
||||
|
||||
route_set_ecommunity(rule, prefix, object);
|
||||
|
||||
path->attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_SRTE_COLOR);
|
||||
return RMAP_OKAY;
|
||||
}
|
||||
|
||||
|
|
|
@ -1308,9 +1308,7 @@ static void bgp_zebra_announce_parse_nexthop(
|
|||
else
|
||||
api_nh = &api->backup_nexthops[*valid_nh_count];
|
||||
|
||||
if (CHECK_FLAG(info->attr->flag,
|
||||
ATTR_FLAG_BIT(BGP_ATTR_SRTE_COLOR)))
|
||||
api_nh->srte_color = bgp_attr_get_color(info->attr);
|
||||
api_nh->srte_color = bgp_attr_get_color(info->attr);
|
||||
|
||||
if (bgp_debug_zebra(&api->prefix)) {
|
||||
if (mpinfo->extra) {
|
||||
|
@ -1582,7 +1580,7 @@ bgp_zebra_announce_actual(struct bgp_dest *dest, struct bgp_path_info *info,
|
|||
api.tableid = info->attr->rmap_table_id;
|
||||
}
|
||||
|
||||
if (CHECK_FLAG(info->attr->flag, ATTR_FLAG_BIT(BGP_ATTR_SRTE_COLOR)))
|
||||
if (info->attr->srte_color)
|
||||
SET_FLAG(api.message, ZAPI_MESSAGE_SRTE);
|
||||
|
||||
/* Metric is currently based on the best-path only */
|
||||
|
|
|
@ -1974,7 +1974,6 @@ struct bgp_nlri {
|
|||
#define BGP_ATTR_LARGE_COMMUNITIES 32
|
||||
#define BGP_ATTR_OTC 35
|
||||
#define BGP_ATTR_PREFIX_SID 40
|
||||
#define BGP_ATTR_SRTE_COLOR 51
|
||||
#ifdef ENABLE_BGP_VNC_ATTR
|
||||
#define BGP_ATTR_VNC 255
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue