summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2018-05-16 11:19:29 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2018-05-16 11:19:29 +0200
commitb24b781117179f301116837f0a39468343e4805b (patch)
tree49a076f29957bf48393754b528e919c135f5bfa0 /lib
parenteaf63d314d50cba5b2cfa8f18de64a91d3131b94 (diff)
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/net.h2
1 files changed, 2 insertions, 0 deletions
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; }