mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 21:47:15 +02:00
bgpd: Remove deprecated COMMUNITY_INTERNET community
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
7415f1e120
commit
b2b47bb4a9
|
@ -449,13 +449,6 @@ static char *community_str_get(struct community *com, int i)
|
||||||
comval = ntohl(comval);
|
comval = ntohl(comval);
|
||||||
|
|
||||||
switch (comval) {
|
switch (comval) {
|
||||||
#if CONFDATE > 20230801
|
|
||||||
CPP_NOTICE("Deprecate COMMUNITY_INTERNET BGP community")
|
|
||||||
#endif
|
|
||||||
case COMMUNITY_INTERNET:
|
|
||||||
str = XSTRDUP(MTYPE_COMMUNITY_STR, "internet");
|
|
||||||
zlog_warn("`internet` community is deprecated");
|
|
||||||
break;
|
|
||||||
case COMMUNITY_GSHUT:
|
case COMMUNITY_GSHUT:
|
||||||
str = XSTRDUP(MTYPE_COMMUNITY_STR, "graceful-shutdown");
|
str = XSTRDUP(MTYPE_COMMUNITY_STR, "graceful-shutdown");
|
||||||
break;
|
break;
|
||||||
|
@ -660,9 +653,6 @@ bool community_list_match(struct community *com, struct community_list *list)
|
||||||
|
|
||||||
for (entry = list->head; entry; entry = entry->next) {
|
for (entry = list->head; entry; entry = entry->next) {
|
||||||
if (entry->style == COMMUNITY_LIST_STANDARD) {
|
if (entry->style == COMMUNITY_LIST_STANDARD) {
|
||||||
if (community_include(entry->u.com, COMMUNITY_INTERNET))
|
|
||||||
return entry->direct == COMMUNITY_PERMIT;
|
|
||||||
|
|
||||||
if (community_match(com, entry->u.com))
|
if (community_match(com, entry->u.com))
|
||||||
return entry->direct == COMMUNITY_PERMIT;
|
return entry->direct == COMMUNITY_PERMIT;
|
||||||
} else if (entry->style == COMMUNITY_LIST_EXPANDED) {
|
} else if (entry->style == COMMUNITY_LIST_EXPANDED) {
|
||||||
|
@ -735,9 +725,6 @@ bool community_list_exact_match(struct community *com,
|
||||||
|
|
||||||
for (entry = list->head; entry; entry = entry->next) {
|
for (entry = list->head; entry; entry = entry->next) {
|
||||||
if (entry->style == COMMUNITY_LIST_STANDARD) {
|
if (entry->style == COMMUNITY_LIST_STANDARD) {
|
||||||
if (community_include(entry->u.com, COMMUNITY_INTERNET))
|
|
||||||
return entry->direct == COMMUNITY_PERMIT;
|
|
||||||
|
|
||||||
if (community_cmp(com, entry->u.com))
|
if (community_cmp(com, entry->u.com))
|
||||||
return entry->direct == COMMUNITY_PERMIT;
|
return entry->direct == COMMUNITY_PERMIT;
|
||||||
} else if (entry->style == COMMUNITY_LIST_EXPANDED) {
|
} else if (entry->style == COMMUNITY_LIST_EXPANDED) {
|
||||||
|
@ -767,17 +754,14 @@ struct community *community_list_match_delete(struct community *com,
|
||||||
|
|
||||||
for (entry = list->head; entry; entry = entry->next) {
|
for (entry = list->head; entry; entry = entry->next) {
|
||||||
if ((entry->style == COMMUNITY_LIST_STANDARD) &&
|
if ((entry->style == COMMUNITY_LIST_STANDARD) &&
|
||||||
(community_include(entry->u.com,
|
community_include(entry->u.com, val)) {
|
||||||
COMMUNITY_INTERNET) ||
|
|
||||||
community_include(entry->u.com, val))) {
|
|
||||||
if (entry->direct == COMMUNITY_PERMIT) {
|
if (entry->direct == COMMUNITY_PERMIT) {
|
||||||
com_index_to_delete[delete_index] = i;
|
com_index_to_delete[delete_index] = i;
|
||||||
delete_index++;
|
delete_index++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
} else if ((entry->style == COMMUNITY_LIST_EXPANDED) &&
|
} else if ((entry->style == COMMUNITY_LIST_EXPANDED) &&
|
||||||
community_regexp_include(entry->reg, com,
|
community_regexp_include(entry->reg, com, i)) {
|
||||||
i)) {
|
|
||||||
if (entry->direct == COMMUNITY_PERMIT) {
|
if (entry->direct == COMMUNITY_PERMIT) {
|
||||||
com_index_to_delete[delete_index] = i;
|
com_index_to_delete[delete_index] = i;
|
||||||
delete_index++;
|
delete_index++;
|
||||||
|
|
|
@ -228,13 +228,6 @@ static void set_community_string(struct community *com, bool make_json,
|
||||||
comval = ntohl(comval);
|
comval = ntohl(comval);
|
||||||
|
|
||||||
switch (comval) {
|
switch (comval) {
|
||||||
#if CONFDATE > 20230801
|
|
||||||
CPP_NOTICE("Deprecate COMMUNITY_INTERNET BGP community")
|
|
||||||
#endif
|
|
||||||
case COMMUNITY_INTERNET:
|
|
||||||
len += strlen(" internet");
|
|
||||||
zlog_warn("`internet` community is deprecated");
|
|
||||||
break;
|
|
||||||
case COMMUNITY_GSHUT:
|
case COMMUNITY_GSHUT:
|
||||||
len += strlen(" graceful-shutdown");
|
len += strlen(" graceful-shutdown");
|
||||||
break;
|
break;
|
||||||
|
@ -298,19 +291,6 @@ CPP_NOTICE("Deprecate COMMUNITY_INTERNET BGP community")
|
||||||
strlcat(str, " ", len);
|
strlcat(str, " ", len);
|
||||||
|
|
||||||
switch (comval) {
|
switch (comval) {
|
||||||
#if CONFDATE > 20230801
|
|
||||||
CPP_NOTICE("Deprecate COMMUNITY_INTERNET BGP community")
|
|
||||||
#endif
|
|
||||||
case COMMUNITY_INTERNET:
|
|
||||||
strlcat(str, "internet", len);
|
|
||||||
if (make_json) {
|
|
||||||
json_string =
|
|
||||||
json_object_new_string("internet");
|
|
||||||
json_object_array_add(json_community_list,
|
|
||||||
json_string);
|
|
||||||
}
|
|
||||||
zlog_warn("`internet` community is deprecated");
|
|
||||||
break;
|
|
||||||
case COMMUNITY_GSHUT:
|
case COMMUNITY_GSHUT:
|
||||||
strlcat(str, "graceful-shutdown", len);
|
strlcat(str, "graceful-shutdown", len);
|
||||||
if (make_json) {
|
if (make_json) {
|
||||||
|
@ -680,16 +660,6 @@ community_gettoken(const char *buf, enum community_token *token, uint32_t *val)
|
||||||
|
|
||||||
/* Well known community string check. */
|
/* Well known community string check. */
|
||||||
if (isalpha((unsigned char)*p)) {
|
if (isalpha((unsigned char)*p)) {
|
||||||
#if CONFDATE > 20230801
|
|
||||||
CPP_NOTICE("Deprecate COMMUNITY_INTERNET BGP community")
|
|
||||||
#endif
|
|
||||||
if (strncmp(p, "internet", strlen("internet")) == 0) {
|
|
||||||
*val = COMMUNITY_INTERNET;
|
|
||||||
*token = community_token_no_export;
|
|
||||||
p += strlen("internet");
|
|
||||||
zlog_warn("`internet` community is deprecated");
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
if (strncmp(p, "graceful-shutdown", strlen("graceful-shutdown"))
|
if (strncmp(p, "graceful-shutdown", strlen("graceful-shutdown"))
|
||||||
== 0) {
|
== 0) {
|
||||||
*val = COMMUNITY_GSHUT;
|
*val = COMMUNITY_GSHUT;
|
||||||
|
|
|
@ -30,10 +30,6 @@ struct community {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Well-known communities value. */
|
/* Well-known communities value. */
|
||||||
#if CONFDATE > 20230801
|
|
||||||
CPP_NOTICE("Deprecate COMMUNITY_INTERNET BGP community")
|
|
||||||
#endif
|
|
||||||
#define COMMUNITY_INTERNET 0x0
|
|
||||||
#define COMMUNITY_GSHUT 0xFFFF0000
|
#define COMMUNITY_GSHUT 0xFFFF0000
|
||||||
#define COMMUNITY_ACCEPT_OWN 0xFFFF0001
|
#define COMMUNITY_ACCEPT_OWN 0xFFFF0001
|
||||||
#define COMMUNITY_ROUTE_FILTER_TRANSLATED_v4 0xFFFF0002
|
#define COMMUNITY_ROUTE_FILTER_TRANSLATED_v4 0xFFFF0002
|
||||||
|
|
|
@ -6282,16 +6282,6 @@ DEFUN_YANG (set_community,
|
||||||
else
|
else
|
||||||
first = 1;
|
first = 1;
|
||||||
|
|
||||||
#if CONFDATE > 20230801
|
|
||||||
CPP_NOTICE("Deprecate COMMUNITY_INTERNET BGP community")
|
|
||||||
#endif
|
|
||||||
if (strncmp(argv[i]->arg, "internet", strlen(argv[i]->arg))
|
|
||||||
== 0) {
|
|
||||||
buffer_putstr(b, "internet");
|
|
||||||
vty_out(vty, "%% `internet` community is deprecated\n");
|
|
||||||
zlog_warn("`internet` community is deprecated");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (strncmp(argv[i]->arg, "local-AS", strlen(argv[i]->arg))
|
if (strncmp(argv[i]->arg, "local-AS", strlen(argv[i]->arg))
|
||||||
== 0) {
|
== 0) {
|
||||||
buffer_putstr(b, "local-AS");
|
buffer_putstr(b, "local-AS");
|
||||||
|
|
Loading…
Reference in a new issue