diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-05-10 22:37:47 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2023-05-11 10:39:23 +0200 |
commit | 1c035c8c2c1bc57699697e7d35a631c9e6a1df55 (patch) | |
tree | 9b30bc92148b571a44cc1dfc177827d2ea9ec8ab /yang | |
parent | doc: Use `match source-protocol` for route-maps in BGP as well (diff) | |
download | frr-1c035c8c2c1bc57699697e7d35a631c9e6a1df55.tar.xz frr-1c035c8c2c1bc57699697e7d35a631c9e6a1df55.zip |
bgpd: Implement `match source-protocol` for route-maps
The main idea is to filter routes by matching source (originating) protocol
for outgoing direction. For instance, filter outgoing routes to an arbitrary
router that are static only. Or filter out only routes learned from RIP.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'yang')
-rw-r--r-- | yang/frr-bgp-route-map.yang | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/yang/frr-bgp-route-map.yang b/yang/frr-bgp-route-map.yang index 23e5b0227..b557cabb2 100644 --- a/yang/frr-bgp-route-map.yang +++ b/yang/frr-bgp-route-map.yang @@ -23,6 +23,10 @@ module frr-bgp-route-map { prefix rt-types; } + import frr-route-types { + prefix frr-route-types; + } + organization "Free Range Routing"; contact @@ -168,6 +172,12 @@ module frr-bgp-route-map { "Match IPv6 next hop address"; } + identity source-protocol { + base frr-route-map:rmap-match-type; + description + "Match protocol via which the route was learnt"; + } + identity distance { base frr-route-map:rmap-set-type; description @@ -759,6 +769,13 @@ module frr-bgp-route-map { "IPv6 address"; } } + + case source-protocol { + when "derived-from-or-self(../frr-route-map:condition, 'frr-bgp-route-map:source-protocol')"; + leaf source-protocol { + type frr-route-types:frr-route-types; + } + } } augment "/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:set-action/frr-route-map:rmap-set-action/frr-route-map:set-action" { |