From 512795a673f999fb04b84dbbbe41174e9c581430 Mon Sep 17 00:00:00 2001 From: wenxu Date: Thu, 24 Jan 2019 22:23:49 +0800 Subject: 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 Signed-off-by: Florian Westphal --- src/meta.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/meta.c') 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) -- cgit v1.2.3