Skip to content

Commit

Permalink
Merge pull request FRRouting#17351 from FRRouting/mergify/bp/stable/9…
Browse files Browse the repository at this point in the history
….0/pr-17305

bgpd: Treat numbered community-list only if it's in a range 1-500 (backport FRRouting#17305)
  • Loading branch information
donaldsharp authored Nov 5, 2024
2 parents 24fe881 + 316665e commit 77fa604
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bgpd/bgp_clist.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ community_list_insert(struct community_list_handler *ch, const char *name,
}

/* In case of name is all digit character */
if (i == strlen(name)) {
if (i == strlen(name) && number <= COMMUNITY_LIST_NUMBER_MAX) {
new->sort = COMMUNITY_LIST_NUMBER;

/* Set access_list to number list. */
Expand Down
4 changes: 4 additions & 0 deletions bgpd/bgp_clist.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
/* Number and string based community-list name. */
#define COMMUNITY_LIST_STRING 0
#define COMMUNITY_LIST_NUMBER 1
/* The numbered community-list (including large/ext communities)
* have a range between 1-500.
*/
#define COMMUNITY_LIST_NUMBER_MAX 500

#define COMMUNITY_SEQ_NUMBER_AUTO -1

Expand Down

0 comments on commit 77fa604

Please sign in to comment.