From c3084cacf4816cd0bba5ad8695bbf3365500563f Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Fri, 14 Feb 2025 09:24:20 +0100 Subject: bgpd: add 'match extcommunity-count' command to restrict comm count Add a mechanism in route-map to filter out route-map which have a list of extended 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 eb01709707..a59d504287 100644 --- a/lib/routemap_cli.c +++ b/lib/routemap_cli.c @@ -715,6 +715,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:rpki")); + } else if (IS_MATCH_EXTCOMMUNITY_LIMIT(condition)) { + vty_out(vty, " match extcommunity-limit %s\n", + yang_dnode_get_string(dnode, + "./rmap-match-condition/frr-bgp-route-map:extcommunity-limit")); } else if (IS_MATCH_RPKI_EXTCOMMUNITY(condition)) { vty_out(vty, " match rpki-extcommunity %s\n", yang_dnode_get_string( -- cgit v1.2.3