diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2025-02-28 10:08:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-28 10:08:27 +0200 |
| commit | d49561e32a8ea870a4597e56591cd4ca44abaa7c (patch) | |
| tree | b01db3228135f9af3b14a573b3ec8808f987e736 /lib | |
| parent | e27631e10ae0f45ccada53e556c6c1331dbadd19 (diff) | |
| parent | 2b71dc2d91976f947fe603fc8ec8f7d435fcac50 (diff) | |
Merge pull request #18159 from pguibert6WIND/bgp_ecommlist_count
Bgp ecommlist count
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/routemap.h | 1 | ||||
| -rw-r--r-- | lib/routemap_cli.c | 14 |
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/routemap.h b/lib/routemap.h index 1c02348313..0e41a7a856 100644 --- a/lib/routemap.h +++ b/lib/routemap.h @@ -317,6 +317,7 @@ DECLARE_QOBJ_TYPE(route_map); (strmatch(C, "frr-bgp-route-map:match-large-community")) #define IS_MATCH_EXTCOMMUNITY(C) \ (strmatch(C, "frr-bgp-route-map:match-extcommunity")) +#define IS_MATCH_EXTCOMMUNITY_LIMIT(C) (strmatch(C, "frr-bgp-route-map:match-extcommunity-limit")) #define IS_MATCH_IPV4_NH(C) \ (strmatch(C, "frr-bgp-route-map:ipv4-nexthop")) #define IS_MATCH_IPV6_NH(C) \ diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c index eb01709707..f045bc7e4c 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( @@ -843,10 +847,18 @@ void route_map_condition_show(struct vty *vty, const struct lyd_node *dnode, vty_out(vty, " any"); vty_out(vty, "\n"); } else if (IS_MATCH_EXTCOMMUNITY(condition)) { - vty_out(vty, " match extcommunity %s\n", + vty_out(vty, " match extcommunity %s", yang_dnode_get_string( dnode, "./rmap-match-condition/frr-bgp-route-map:comm-list/comm-list-name")); + if (yang_dnode_get_bool( + dnode, + "./rmap-match-condition/frr-bgp-route-map:comm-list/comm-list-name-exact-match")) + vty_out(vty, " exact-match"); + if (yang_dnode_get_bool(dnode, + "./rmap-match-condition/frr-bgp-route-map:comm-list/comm-list-name-any")) + vty_out(vty, " any"); + vty_out(vty, "\n"); } else if (IS_MATCH_IPV4_NH(condition)) { vty_out(vty, " match ip next-hop address %s\n", yang_dnode_get_string( |
