From 4410f874873887ca6ee792701d0ee9e2fe319439 Mon Sep 17 00:00:00 2001 From: Ana Rey Date: Sun, 24 Aug 2014 14:21:00 +0200 Subject: 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 Signed-off-by: Pablo Neira Ayuso --- src/meta.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/meta.c') 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) -- cgit v1.2.3