From b6dbdee5adf801a2f8088a8ba974c354b1bc3777 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 24 Aug 2022 08:46:56 +0300 Subject: [PATCH] Revert "bgpd: Drop `internet` community check from community_list_match()" Seems that, `internet` community is used to match ANY community. This reverts commit e605d0cfae6a3fc9b65058ec85b55d7d0bd5cc22. --- bgpd/bgp_clist.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c index bc6d4e144e..34d4be8c93 100644 --- a/bgpd/bgp_clist.c +++ b/bgpd/bgp_clist.c @@ -674,6 +674,9 @@ bool community_list_match(struct community *com, struct community_list *list) return entry->direct == COMMUNITY_PERMIT; 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)) return entry->direct == COMMUNITY_PERMIT; } else if (entry->style == COMMUNITY_LIST_EXPANDED) { -- 2.39.5