summaryrefslogtreecommitdiff
path: root/bgpd/bgp_clist.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_clist.c')
-rw-r--r--bgpd/bgp_clist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c
index e522307134..634775cfd3 100644
--- a/bgpd/bgp_clist.c
+++ b/bgpd/bgp_clist.c
@@ -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. */