summaryrefslogtreecommitdiffstats
path: root/lib/routemap_cli.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2024-10-16 13:51:20 +0200
committerGitHub <noreply@github.com>2024-10-16 13:51:20 +0200
commit80dc863d92606794e1ef9960b2bdac68695d7f3e (patch)
treeb1ca66707949519d6f9cc1c0af1480812a60fd94 /lib/routemap_cli.c
parentMerge pull request #17114 from Jafaral/getenv (diff)
parenttests: Check if `match src-peer ...` can be used for incoming route-map (diff)
downloadfrr-80dc863d92606794e1ef9960b2bdac68695d7f3e.tar.xz
frr-80dc863d92606794e1ef9960b2bdac68695d7f3e.zip
Merge pull request #16946 from opensourcerouting/fix/match_src-peer
bgpd: Implement match src-peer ... command
Diffstat (limited to 'lib/routemap_cli.c')
-rw-r--r--lib/routemap_cli.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/routemap_cli.c b/lib/routemap_cli.c
index 432805c8d..69b942064 100644
--- a/lib/routemap_cli.c
+++ b/lib/routemap_cli.c
@@ -756,6 +756,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(