From 5d3da70ba379bdfa7310874bcd2ae55930465e14 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 25 Sep 2024 15:27:54 +0300 Subject: bgpd: Implement `match src-peer ...` command To match source peer on the outgoing direction. Signed-off-by: Donatas Abraitis --- lib/routemap_cli.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/routemap_cli.c') diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c index f22d588080..817ac7cbe0 100644 --- a/lib/routemap_cli.c +++ b/lib/routemap_cli.c @@ -688,6 +688,18 @@ void route_map_condition_show(struct vty *vty, const struct lyd_node *dnode, acl = "local"; vty_out(vty, " match peer %s\n", acl); + } else if (IS_MATCH_SRC_PEER(condition)) { + acl = NULL; + ln = yang_dnode_get(dnode, + "./rmap-match-condition/frr-bgp-route-map:src-peer-ipv4-address"); + if (!ln) + ln = yang_dnode_get(dnode, + "./rmap-match-condition/frr-bgp-route-map:src-peer-ipv6-address"); + if (!ln) + ln = yang_dnode_get(dnode, + "./rmap-match-condition/frr-bgp-route-map:src-peer-interface"); + acl = yang_dnode_get_string(ln, NULL); + vty_out(vty, " match src-peer %s\n", acl); } else if (IS_MATCH_AS_LIST(condition)) { vty_out(vty, " match as-path %s\n", yang_dnode_get_string( -- cgit v1.2.3