From 324e8b1f79ccd00f75cdb8ba95ba0c0ee5e82b4d Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Wed, 31 Aug 2022 23:00:26 +0300 Subject: bgpd: Handle Origin Validation State extended community via route-map match Add an ability to match via route-maps. An additional route-map command `match rpki-extcommunity ` added. Signed-off-by: Donatas Abraitis --- yang/frr-bgp-route-map.yang | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'yang/frr-bgp-route-map.yang') diff --git a/yang/frr-bgp-route-map.yang b/yang/frr-bgp-route-map.yang index eaa7891f0..84d5b74dd 100644 --- a/yang/frr-bgp-route-map.yang +++ b/yang/frr-bgp-route-map.yang @@ -66,6 +66,12 @@ module frr-bgp-route-map { "Control rpki specific settings"; } + identity rpki-extcommunity { + base frr-route-map:rmap-match-type; + description + "Control rpki specific settings derived from extended community"; + } + identity probability { base frr-route-map:rmap-match-type; description @@ -430,6 +436,29 @@ module frr-bgp-route-map { } } + case rpki-extcommunity { + when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:rpki-extcommunity')"; + leaf rpki-extcommunity { + type enumeration { + enum "valid" { + value 0; + description + "Valid prefix"; + } + enum "notfound" { + value 1; + description + "Prefix not found"; + } + enum "invalid" { + value 2; + description + "Invalid prefix"; + } + } + } + } + case probability { when "derived-from-or-self(/frr-route-map:lib/frr-route-map:route-map/frr-route-map:entry/frr-route-map:match-condition/frr-route-map:condition, 'frr-bgp-route-map:probability')"; leaf probability { -- cgit v1.2.3