diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-05-16 11:19:29 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-05-16 11:19:29 +0200 |
commit | b24b781117179f301116837f0a39468343e4805b (patch) | |
tree | 49a076f29957bf48393754b528e919c135f5bfa0 /lib/net.h | |
parent | eaf63d314d50cba5b2cfa8f18de64a91d3131b94 (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/net.h')
-rw-r--r-- | lib/net.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; } |