From b24b781117179f301116837f0a39468343e4805b Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Wed, 16 May 2018 11:19:29 +0200 Subject: Filter: Add support for src filter op to access SADR source prefix The patch allows to use 'net.src' to access SADR source prefix from filters. Thanks to Toke Hoiland-Jorgensen for the original patch for srclen. --- lib/net.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/net.h b/lib/net.h index ad4000fd..0cd5f735 100644 --- a/lib/net.h +++ b/lib/net.h @@ -268,6 +268,8 @@ static inline int net_is_roa(const net_addr *a) static inline int net_is_flow(const net_addr *a) { return (a->type == NET_FLOW4) || (a->type == NET_FLOW6); } +static inline int net_is_sadr(const net_addr *a) +{ return (a->type == NET_IP6_SADR); } static inline ip4_addr net4_prefix(const net_addr *a) { return ((net_addr_ip4 *) a)->prefix; } -- cgit v1.2.3