summaryrefslogtreecommitdiff
path: root/lib/routemap_cli.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2025-01-10 17:29:10 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2025-01-14 13:59:42 +0100
commitf19b8668b3cbbad6d14eb348c9b8a0f7ac6ac46f (patch)
tree5f0c3b2c69bdaeb1ebdbcf1bd1547110269fba96 /lib/routemap_cli.c
parentba4122d6dbc641e7549e947ed420301939e48529 (diff)
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 <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/routemap_cli.c')
-rw-r--r--lib/routemap_cli.c4
1 files changed, 4 insertions, 0 deletions
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(