diff options
author | wenxu <wenxu@ucloud.cn> | 2019-01-24 22:23:49 +0800 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2019-01-28 07:36:22 +0100 |
commit | 512795a673f999fb04b84dbbbe41174e9c581430 (patch) | |
tree | 22becd9b9be0890253977be3709a87be73d8ac47 /src/meta.c | |
parent | 88ba0c92754d89c71dab11f701839522a5ddb5a9 (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/meta.c')
-rw-r--r-- | src/meta.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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) |