mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 01:47:29 +00:00
bgpd: Drop SRTE_COLOR attribute flag
SRTE_COLOR is not defined at all as an attribute, it was a mistake from the beginning. SRTE_COLOR is extended community, can't see the reason having it as a community, and a separate attribute. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
5ef6a2bb54
commit
619321de78
@ -517,11 +517,9 @@ static inline void bgp_attr_set_ecommunity(struct attr *attr,
|
|||||||
{
|
{
|
||||||
attr->ecommunity = ecomm;
|
attr->ecommunity = ecomm;
|
||||||
|
|
||||||
if (ecomm) {
|
if (ecomm)
|
||||||
SET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES));
|
SET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES));
|
||||||
if (ecommunity_select_color(ecomm))
|
else
|
||||||
SET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_SRTE_COLOR));
|
|
||||||
} else
|
|
||||||
UNSET_FLAG(attr->flag, ATTR_FLAG_BIT(BGP_ATTR_EXT_COMMUNITIES));
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CHECK_FLAG(pi->attr->flag,
|
srte_color = bgp_attr_get_color(pi->attr);
|
||||||
ATTR_FLAG_BIT(BGP_ATTR_SRTE_COLOR)))
|
|
||||||
srte_color = bgp_attr_get_color(pi->attr);
|
|
||||||
|
|
||||||
} else if (peer) {
|
} else if (peer) {
|
||||||
/*
|
/*
|
||||||
|
@ -1944,7 +1944,6 @@ route_set_srte_color(void *rule, const struct prefix *prefix, void *object)
|
|||||||
path = object;
|
path = object;
|
||||||
|
|
||||||
path->attr->srte_color = *srte_color;
|
path->attr->srte_color = *srte_color;
|
||||||
path->attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_SRTE_COLOR);
|
|
||||||
|
|
||||||
return RMAP_OKAY;
|
return RMAP_OKAY;
|
||||||
}
|
}
|
||||||
@ -3317,13 +3316,8 @@ static enum route_map_cmd_result_t
|
|||||||
route_set_ecommunity_color(void *rule, const struct prefix *prefix,
|
route_set_ecommunity_color(void *rule, const struct prefix *prefix,
|
||||||
void *object)
|
void *object)
|
||||||
{
|
{
|
||||||
struct bgp_path_info *path;
|
|
||||||
|
|
||||||
path = object;
|
|
||||||
|
|
||||||
route_set_ecommunity(rule, prefix, object);
|
route_set_ecommunity(rule, prefix, object);
|
||||||
|
|
||||||
path->attr->flag |= ATTR_FLAG_BIT(BGP_ATTR_SRTE_COLOR);
|
|
||||||
return RMAP_OKAY;
|
return RMAP_OKAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1308,9 +1308,7 @@ static void bgp_zebra_announce_parse_nexthop(
|
|||||||
else
|
else
|
||||||
api_nh = &api->backup_nexthops[*valid_nh_count];
|
api_nh = &api->backup_nexthops[*valid_nh_count];
|
||||||
|
|
||||||
if (CHECK_FLAG(info->attr->flag,
|
api_nh->srte_color = bgp_attr_get_color(info->attr);
|
||||||
ATTR_FLAG_BIT(BGP_ATTR_SRTE_COLOR)))
|
|
||||||
api_nh->srte_color = bgp_attr_get_color(info->attr);
|
|
||||||
|
|
||||||
if (bgp_debug_zebra(&api->prefix)) {
|
if (bgp_debug_zebra(&api->prefix)) {
|
||||||
if (mpinfo->extra) {
|
if (mpinfo->extra) {
|
||||||
@ -1581,7 +1579,7 @@ bgp_zebra_announce_actual(struct bgp_dest *dest, struct bgp_path_info *info,
|
|||||||
api.tableid = info->attr->rmap_table_id;
|
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);
|
SET_FLAG(api.message, ZAPI_MESSAGE_SRTE);
|
||||||
|
|
||||||
/* Metric is currently based on the best-path only */
|
/* Metric is currently based on the best-path only */
|
||||||
|
@ -1971,7 +1971,6 @@ struct bgp_nlri {
|
|||||||
#define BGP_ATTR_LARGE_COMMUNITIES 32
|
#define BGP_ATTR_LARGE_COMMUNITIES 32
|
||||||
#define BGP_ATTR_OTC 35
|
#define BGP_ATTR_OTC 35
|
||||||
#define BGP_ATTR_PREFIX_SID 40
|
#define BGP_ATTR_PREFIX_SID 40
|
||||||
#define BGP_ATTR_SRTE_COLOR 51
|
|
||||||
#ifdef ENABLE_BGP_VNC_ATTR
|
#ifdef ENABLE_BGP_VNC_ATTR
|
||||||
#define BGP_ATTR_VNC 255
|
#define BGP_ATTR_VNC 255
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user