diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-09-25 14:27:54 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-09-27 22:01:06 +0200 |
commit | 5d3da70ba379bdfa7310874bcd2ae55930465e14 (patch) | |
tree | 097369081e2d46558e8849639897f6ac32f1a0e0 /yang | |
parent | bgpd: Add back pointer to source (from) peer in bgp_path_info struct (diff) | |
download | frr-5d3da70ba379bdfa7310874bcd2ae55930465e14.tar.xz frr-5d3da70ba379bdfa7310874bcd2ae55930465e14.zip |
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 'yang')
-rw-r--r-- | yang/frr-bgp-route-map.yang | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/yang/frr-bgp-route-map.yang b/yang/frr-bgp-route-map.yang index 44058ab04..4ed80d7d0 100644 --- a/yang/frr-bgp-route-map.yang +++ b/yang/frr-bgp-route-map.yang @@ -94,6 +94,12 @@ module frr-bgp-route-map { "Match peer address"; } + identity src-peer { + base frr-route-map:rmap-match-type; + description + "Match source peer address"; + } + identity mac-address-list { base frr-route-map:rmap-match-type; description @@ -688,6 +694,37 @@ identity set-extcommunity-color { } } + case src-peer { + when "derived-from-or-self(../frr-route-map:condition, 'frr-bgp-route-map:src-peer')"; + choice peer { + description + "Value of the peer"; + case src-peer-ipv4-address { + description + "IP address of peer"; + leaf src-peer-ipv4-address { + type inet:ipv4-address; + } + } + + case src-peer-interface { + description + "Interface name of peer"; + leaf src-peer-interface { + type string; + } + } + + case src-peer-ipv6-address { + description + "IPv6 address of peer"; + leaf src-peer-ipv6-address { + type inet:ipv6-address; + } + } + } + } + case access-list-name { when "derived-from-or-self(../frr-route-map:condition, 'frr-bgp-route-map:mac-address-list') or " + "derived-from-or-self(../frr-route-map:condition, 'frr-bgp-route-map:as-path-list') or " |