summaryrefslogtreecommitdiff
path: root/lib/prefix.h
diff options
context:
space:
mode:
authorStephen Worley <sworley@nvidia.com>2021-03-09 18:59:09 -0500
committerStephen Worley <sworley@nvidia.com>2022-08-23 12:41:25 -0400
commit6eb8350586c7eb2afa1ed20381c1febd296e38ed (patch)
tree7da8892ddd977de582d95c3a74c45275f7a83f04 /lib/prefix.h
parent24df3379881fc7bec6c23294ca5b8c33fcecab63 (diff)
bgpd,lib: route-map/plist matching via type-2/5 routes
Implement the ability to match type-2 and type-5 routes via a route-map and a prefix-list. Add some library code to convert an evpn prefix into a general ipv4/ipv6 prefix for type-2 and type-5 routes. evpn prefix is really just another subtype of prefix so all the info needed can be extracted right there. Add a special handler to bgp_routemap for evpn type routes when applying the outbound route-map. This calls the library code to convert the evpn_prefix to a ipv4/ipv6 prefix and run it through the plist code. In this we assume type-2 routes are a /32. Signed-off-by: Stephen Worley <sworley@nvidia.com>
Diffstat (limited to 'lib/prefix.h')
-rw-r--r--lib/prefix.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/prefix.h b/lib/prefix.h
index 7b2f889874..026e525f61 100644
--- a/lib/prefix.h
+++ b/lib/prefix.h
@@ -510,6 +510,7 @@ extern char *esi_to_str(const esi_t *esi, char *buf, int size);
extern char *evpn_es_df_alg2str(uint8_t df_alg, char *buf, int buf_len);
extern void prefix_evpn_hexdump(const struct prefix_evpn *p);
extern bool ipv4_unicast_valid(const struct in_addr *addr);
+extern int evpn_prefix2prefix(const struct prefix *evpn, struct prefix *to);
static inline int ipv6_martian(const struct in6_addr *addr)
{