for symmetry with 'rt ipsec'. "meta secpath" still works.
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
*meta* {length | nfproto | l4proto | protocol | priority}
[meta] {mark | iif | iifname | iiftype | oif | oifname | oiftype |
skuid | skgid | nftrace | rtclassid | ibrname | obrname | pkttype | cpu
-| iifgroup | oifgroup | cgroup | random | secpath}
+| iifgroup | oifgroup | cgroup | random | ipsec}
A meta expression refers to meta data associated with a packet.
|random|
pseudo-random number|
integer (32 bit)
-|secpath|
+|ipsec|
boolean|
boolean (1 bit)
|====================
filter output oif eth0
# packed was subject to ipsec processing
-raw prerouting meta secpath exists accept
+raw prerouting meta ipsec exists accept
-----------------------
SOCKET EXPRESSION
[NFT_META_PRANDOM] = META_TEMPLATE("random", &integer_type,
4 * BITS_PER_BYTE,
BYTEORDER_BIG_ENDIAN), /* avoid conversion; doesn't have endianess */
- [NFT_META_SECPATH] = META_TEMPLATE("secpath", &boolean_type,
+ [NFT_META_SECPATH] = META_TEMPLATE("ipsec", &boolean_type,
BITS_PER_BYTE, BYTEORDER_HOST_ENDIAN),
};
} else if (strcmp(str, "obriport") == 0) {
*value = NFT_META_BRI_OIFNAME;
return NULL;
+ } else if (strcmp(str, "secpath") == 0) {
+ *value = NFT_META_SECPATH;
+ return NULL;
}
len = (int)sizeof(buf);
| IIFGROUP { $$ = NFT_META_IIFGROUP; }
| OIFGROUP { $$ = NFT_META_OIFGROUP; }
| CGROUP { $$ = NFT_META_CGROUP; }
+ | IPSEC { $$ = NFT_META_SECPATH; }
;
meta_stmt : META meta_key SET stmt_expr
meta nfproto ipv4 ip saddr 1.2.3.4;ok;ip saddr 1.2.3.4
meta nfproto ipv6 meta l4proto tcp;ok;meta nfproto ipv6 meta l4proto 6
meta nfproto ipv4 counter ip saddr 1.2.3.4;ok
-meta secpath exists;ok
-meta secpath missing;ok
+meta ipsec exists;ok
+meta secpath missing;ok;meta ipsec missing
meta ibrname "br0";fail
meta obrname "br0";fail
[ payload load 4b @ network header + 12 => reg 1 ]
[ cmp eq reg 1 0x04030201 ]
-# meta secpath exists
+# meta ipsec exists
inet test-inet input
[ meta load secpath => reg 1 ]
[ cmp eq reg 1 0x00000001 ]