diff options
| author | Donatas Abraitis <donatas.abraitis@gmail.com> | 2022-02-19 11:08:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-19 11:08:29 +0200 |
| commit | 13a95e53822fbf8fabdd3e16f64af8a9af1fef05 (patch) | |
| tree | 71dfec82586b46486eed8846134a624c03372441 | |
| parent | 52ddb8d545bef4a4322a31a9b5bc5c5b1a3c4573 (diff) | |
| parent | 79d2f64ee16d21a36718215dbf948031121513ac (diff) | |
Merge pull request #10539 from chiragshah6/evpn_dev1
bgpd: evpn route-map match ead type-1 route-type
| -rw-r--r-- | bgpd/bgp_routemap.c | 18 | ||||
| -rw-r--r-- | doc/user/routemap.rst | 12 | ||||
| -rw-r--r-- | yang/frr-bgp-route-map.yang | 10 |
3 files changed, 37 insertions, 3 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index fa03276f64..efb7f9eb7b 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -1039,10 +1039,14 @@ static void *route_match_evpn_route_type_compile(const char *arg) route_type = XMALLOC(MTYPE_ROUTE_MAP_COMPILED, sizeof(uint8_t)); - if (strncmp(arg, "ma", 2) == 0) + if (strncmp(arg, "ea", 2) == 0) + *route_type = BGP_EVPN_AD_ROUTE; + else if (strncmp(arg, "ma", 2) == 0) *route_type = BGP_EVPN_MAC_IP_ROUTE; else if (strncmp(arg, "mu", 2) == 0) *route_type = BGP_EVPN_IMET_ROUTE; + else if (strncmp(arg, "es", 2) == 0) + *route_type = BGP_EVPN_ES_ROUTE; else *route_type = BGP_EVPN_IP_PREFIX_ROUTE; @@ -4167,14 +4171,18 @@ static const char *parse_evpn_rt_type(const char *num_rt_type) DEFUN_YANG (match_evpn_route_type, match_evpn_route_type_cmd, - "match evpn route-type <macip|2|multicast|3|prefix|5>", + "match evpn route-type <ead|1|macip|2|multicast|3|es|4|prefix|5>", MATCH_STR EVPN_HELP_STR EVPN_TYPE_HELP_STR + EVPN_TYPE_1_HELP_STR + EVPN_TYPE_1_HELP_STR EVPN_TYPE_2_HELP_STR EVPN_TYPE_2_HELP_STR EVPN_TYPE_3_HELP_STR EVPN_TYPE_3_HELP_STR + EVPN_TYPE_4_HELP_STR + EVPN_TYPE_4_HELP_STR EVPN_TYPE_5_HELP_STR EVPN_TYPE_5_HELP_STR) { @@ -4194,15 +4202,19 @@ DEFUN_YANG (match_evpn_route_type, DEFUN_YANG (no_match_evpn_route_type, no_match_evpn_route_type_cmd, - "no match evpn route-type <macip|2|multicast|3|prefix|5>", + "no match evpn route-type <ead|1|macip|2|multicast|3|es|4|prefix|5>", NO_STR MATCH_STR EVPN_HELP_STR EVPN_TYPE_HELP_STR + EVPN_TYPE_1_HELP_STR + EVPN_TYPE_1_HELP_STR EVPN_TYPE_2_HELP_STR EVPN_TYPE_2_HELP_STR EVPN_TYPE_3_HELP_STR EVPN_TYPE_3_HELP_STR + EVPN_TYPE_4_HELP_STR + EVPN_TYPE_4_HELP_STR EVPN_TYPE_5_HELP_STR EVPN_TYPE_5_HELP_STR) { diff --git a/doc/user/routemap.rst b/doc/user/routemap.rst index a7f22cd40c..ef7aef9c5e 100644 --- a/doc/user/routemap.rst +++ b/doc/user/routemap.rst @@ -215,6 +215,18 @@ Route Map Match Command This is a ZEBRA specific match command. The number is a range from (0-255). Matches the originating protocols instance specified. +.. clicmd:: match evpn route-type ROUTE_TYPE_NAME + + This is a BGP EVPN specific match command. It matches to EVPN route-type + from type-1 (EAD route-type) to type-5 (Prefix route-type). + User can provide in an integral form (1-5) or string form of route-type + (i.e ead, macip, multicast, es, prefix). + +.. clicmd:: match evpn vni NUMBER + + This is a BGP EVPN specific match command which matches to EVPN VNI id. + The number is a range from (1-6777215). + .. _route-map-set-command: Route Map Set Command diff --git a/yang/frr-bgp-route-map.yang b/yang/frr-bgp-route-map.yang index 9bd26043a7..74008bc078 100644 --- a/yang/frr-bgp-route-map.yang +++ b/yang/frr-bgp-route-map.yang @@ -532,6 +532,16 @@ module frr-bgp-route-map { description "Prefix route"; } + enum "ead" { + value 3; + description + "Ethernet Auto-Discovery route"; + } + enum "es" { + value 4; + description + "Ethernet Segment route"; + } } } } |
