summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwenxu <wenxu@ucloud.cn>2019-01-24 22:23:49 +0800
committerFlorian Westphal <fw@strlen.de>2019-01-28 07:36:22 +0100
commit512795a673f999fb04b84dbbbe41174e9c581430 (patch)
tree22becd9b9be0890253977be3709a87be73d8ac47 /src
parent88ba0c92754d89c71dab11f701839522a5ddb5a9 (diff)
meta: add iifkind and oifkind support
This can be used to match the kind type of iif or oif interface of the packet. Example: add rule inet raw prerouting meta iifkind "vrf" accept Signed-off-by: wenxu <wenxu@ucloud.cn> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src')
-rw-r--r--src/meta.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/meta.c b/src/meta.c
index c8a7b13b..4cb91773 100644
--- a/src/meta.c
+++ b/src/meta.c
@@ -444,6 +444,12 @@ const struct meta_template meta_templates[] = {
BYTEORDER_BIG_ENDIAN), /* avoid conversion; doesn't have endianess */
[NFT_META_SECPATH] = META_TEMPLATE("ipsec", &boolean_type,
BITS_PER_BYTE, BYTEORDER_HOST_ENDIAN),
+ [NFT_META_IIFKIND] = META_TEMPLATE("iifkind", &ifname_type,
+ IFNAMSIZ * BITS_PER_BYTE,
+ BYTEORDER_HOST_ENDIAN),
+ [NFT_META_OIFKIND] = META_TEMPLATE("oifkind", &ifname_type,
+ IFNAMSIZ * BITS_PER_BYTE,
+ BYTEORDER_HOST_ENDIAN),
};
static bool meta_key_is_unqualified(enum nft_meta_keys key)