diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-09-25 15:27:54 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-09-27 23:01:06 +0300 |
| commit | 5d3da70ba379bdfa7310874bcd2ae55930465e14 (patch) | |
| tree | 097369081e2d46558e8849639897f6ac32f1a0e0 /lib/routemap_cli.c | |
| parent | 419e024b3f142f26fea0aacf7921af071eb4f334 (diff) | |
bgpd: Implement `match src-peer ...` command
To match source peer on the outgoing direction.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'lib/routemap_cli.c')
| -rw-r--r-- | lib/routemap_cli.c | 12 |
1 files changed, 12 insertions, 0 deletions
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( |
