summaryrefslogtreecommitdiffstats
path: root/src/meta.c
diff options
context:
space:
mode:
authorAna Rey <anarey@gmail.com>2014-08-24 14:21:00 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2014-08-24 14:21:39 +0200
commit4410f874873887ca6ee792701d0ee9e2fe319439 (patch)
tree6fd92a34623488c6b459c247a3581978dff35f56 /src/meta.c
parent97f0ffc9efa7a0c7ecfbbfacf1fb066a2a350ad8 (diff)
src: Add support for cpu in meta expresion
This allows you to match cpu handling with a packet. This is an example of the syntax for this new attribute: nft add rule ip test input meta cpu 1 counter nft add rule ip test input meta cpu 1-3 counter nft add rule ip test input meta cpu { 1, 3} counter 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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/meta.c b/src/meta.c
index 7b75caf7..1f7217f0 100644
--- a/src/meta.c
+++ b/src/meta.c
@@ -393,6 +393,9 @@ static const struct meta_template meta_templates[] = {
[NFT_META_PKTTYPE] = META_TEMPLATE("pkttype", &pkttype_type,
BITS_PER_BYTE,
BYTEORDER_HOST_ENDIAN),
+ [NFT_META_CPU] = META_TEMPLATE("cpu", &integer_type,
+ BITS_PER_BYTE,
+ BYTEORDER_HOST_ENDIAN),
};
static void meta_expr_print(const struct expr *expr)