summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2019-12-18 12:10:41 +0100
committerFlorian Westphal <fw@strlen.de>2020-01-03 13:09:56 +0100
commit09fcaafc5a2de4379574a0882f976a14d8c49dfe (patch)
treef3e6a40abeac0ac40fa42f81aaded9f9d41b93d3 /src
parentb5932e4283a7249fc51e221b31da282adce156bf (diff)
meta: add slave device matching
Adds "meta sdif" and "meta sdifname". Both only work in input/forward hook of ipv4/ipv6/inet family. Cc: Martin Willi <martin@strongswan.org> 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 135f84b5..acc348eb 100644
--- a/src/meta.c
+++ b/src/meta.c
@@ -700,6 +700,12 @@ const struct meta_template meta_templates[] = {
BYTEORDER_HOST_ENDIAN),
[NFT_META_SECMARK] = META_TEMPLATE("secmark", &integer_type,
32, BYTEORDER_HOST_ENDIAN),
+ [NFT_META_SDIF] = META_TEMPLATE("sdif", &ifindex_type,
+ sizeof(int) * BITS_PER_BYTE,
+ BYTEORDER_HOST_ENDIAN),
+ [NFT_META_SDIFNAME] = META_TEMPLATE("sdifname", &ifname_type,
+ IFNAMSIZ * BITS_PER_BYTE,
+ BYTEORDER_HOST_ENDIAN),
};
static bool meta_key_is_unqualified(enum nft_meta_keys key)