From f19b8668b3cbbad6d14eb348c9b8a0f7ac6ac46f Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Fri, 10 Jan 2025 17:29:10 +0100 Subject: bgpd: add 'match community-count' command to restrict comm count Add a mechanism in route-map to filter out route-map which have a list of communities greater than the given number. Signed-off-by: Philippe Guibert --- lib/routemap_cli.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/routemap_cli.c') diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c index 69b942064b..eb01709707 100644 --- a/lib/routemap_cli.c +++ b/lib/routemap_cli.c @@ -810,6 +810,10 @@ void route_map_condition_show(struct vty *vty, const struct lyd_node *dnode, yang_dnode_get_string( dnode, "./rmap-match-condition/frr-bgp-route-map:list-name")); + } else if (IS_MATCH_COMMUNITY_LIMIT(condition)) { + vty_out(vty, " match community-limit %s\n", + yang_dnode_get_string(dnode, + "./rmap-match-condition/frr-bgp-route-map:community-limit")); } else if (IS_MATCH_COMMUNITY(condition)) { vty_out(vty, " match community %s", yang_dnode_get_string( -- cgit v1.2.3