diff options
author | Máté Eckl <ecklm94@gmail.com> | 2018-09-05 11:16:44 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-09-21 12:06:27 +0200 |
commit | 57c2b152c5f0866be5bf1acda2f341ba26ba9448 (patch) | |
tree | 091cabd5ef590d0d0edf0dc972d3cf53ae0008cb /include/expression.h | |
parent | 8f55ed41d007061bd8aae94fee2bda172c0e8996 (diff) |
src: add ipsec (xfrm) expression
This allows matching on ipsec tunnel/beet addresses in xfrm state
associated with a packet, ipsec request id and the SPI.
Examples:
ipsec in ip saddr 192.168.1.0/24
ipsec out ip6 daddr @endpoints
ipsec in spi 1-65536
Joint work with Florian Westphal.
Cc: Máté Eckl <ecklm94@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'include/expression.h')
-rw-r--r-- | include/expression.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/expression.h b/include/expression.h index f2c5c1ad..fb52abfe 100644 --- a/include/expression.h +++ b/include/expression.h @@ -69,6 +69,7 @@ enum expr_types { EXPR_HASH, EXPR_RT, EXPR_FIB, + EXPR_XFRM, }; enum ops { @@ -194,6 +195,7 @@ enum expr_flags { #include <ct.h> #include <socket.h> #include <osf.h> +#include <xfrm.h> /** * struct expr @@ -337,6 +339,12 @@ struct expr { uint32_t flags; uint32_t result; } fib; + struct { + /* EXPR_XFRM */ + enum nft_xfrm_keys key; + uint8_t direction; + uint8_t spnum; + } xfrm; }; }; |