summaryrefslogtreecommitdiffstats
path: root/src/meta.c
diff options
context:
space:
mode:
authorAna Rey <anarey@gmail.com>2014-09-02 20:37:17 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2014-09-03 14:23:48 +0200
commitd23234b11b76c4d3f2be5f844e6dd2a93bac04fb (patch)
tree7a67007704f1a569289cd85cc3db534a7d9e562c /src/meta.c
parent8fa789fe28af5ea252577efd9ea41e7981d4460c (diff)
src: Add devgroup support in meta expresion
This adds device group support in meta expresion. The new attributes of meta are "iffgroup" and "oifgroup" - iffgroup: Match device group of incoming device. - oifgroup: Match device group of outcoming device. Example of use: nft add rule ip test input meta iifgroup 2 counter nft add rule ip test output meta oifgroup 2 counter The kernel and libnftnl support were added in these commits: netfilter: nf_tables: add devgroup support in meta expresion src: meta: Add devgroup support to meta expresion Signed-off-by: Ana Rey <anarey@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/meta.c')
-rw-r--r--src/meta.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/meta.c b/src/meta.c
index bf41ac46..cea3ccbb 100644
--- a/src/meta.c
+++ b/src/meta.c
@@ -396,6 +396,12 @@ static const struct meta_template meta_templates[] = {
[NFT_META_CPU] = META_TEMPLATE("cpu", &integer_type,
4 * BITS_PER_BYTE,
BYTEORDER_HOST_ENDIAN),
+ [NFT_META_IIFGROUP] = META_TEMPLATE("iifgroup", &integer_type,
+ 4 * BITS_PER_BYTE,
+ BYTEORDER_HOST_ENDIAN),
+ [NFT_META_OIFGROUP] = META_TEMPLATE("oifgroup", &integer_type,
+ 4 * BITS_PER_BYTE,
+ BYTEORDER_HOST_ENDIAN),
};
static void meta_expr_print(const struct expr *expr)