From: Florian Westphal <fw@strlen.de>
To: netfilter-devel@vger.kernel.org
Cc: Florian Westphal <fw@strlen.de>
Subject: [PATCH 2/3 libnftnl] expr: add conntrack label match support
Date: Tue, 18 Feb 2014 10:27:23 +0100 [thread overview]
Message-ID: <1392715644-4458-2-git-send-email-fw@strlen.de> (raw)
In-Reply-To: <1392715644-4458-1-git-send-email-fw@strlen.de>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
include/linux/netfilter/nf_tables.h | 2 ++
src/expr/ct.c | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/include/linux/netfilter/nf_tables.h b/include/linux/netfilter/nf_tables.h
index 31ddd06..5bb7b72 100644
--- a/include/linux/netfilter/nf_tables.h
+++ b/include/linux/netfilter/nf_tables.h
@@ -585,6 +585,7 @@ enum nft_meta_attributes {
* @NFT_CT_PROTOCOL: conntrack layer 4 protocol
* @NFT_CT_PROTO_SRC: conntrack layer 4 protocol source
* @NFT_CT_PROTO_DST: conntrack layer 4 protocol destination
+ * @NFT_CT_LABEL: conntrack label
*/
enum nft_ct_keys {
NFT_CT_STATE,
@@ -600,6 +601,7 @@ enum nft_ct_keys {
NFT_CT_PROTOCOL,
NFT_CT_PROTO_SRC,
NFT_CT_PROTO_DST,
+ NFT_CT_LABEL,
};
/**
diff --git a/src/expr/ct.c b/src/expr/ct.c
index 2df761c..4c18dde 100644
--- a/src/expr/ct.c
+++ b/src/expr/ct.c
@@ -33,7 +33,7 @@ struct nft_expr_ct {
#define IP_CT_DIR_REPLY 1
#ifndef NFT_CT_MAX
-#define NFT_CT_MAX (NFT_CT_PROTO_DST + 1)
+#define NFT_CT_MAX (NFT_CT_LABEL + 1)
#endif
static int
@@ -170,7 +170,8 @@ const char *ctkey2str_array[NFT_CT_MAX] = {
[NFT_CT_SRC] = "src",
[NFT_CT_DST] = "dst",
[NFT_CT_PROTO_SRC] = "proto_src",
- [NFT_CT_PROTO_DST] = "proto_dst"
+ [NFT_CT_PROTO_DST] = "proto_dst",
+ [NFT_CT_LABEL] = "label",
};
static const char *ctkey2str(uint32_t ctkey)
--
1.8.1.5
next prev parent reply other threads:[~2014-02-18 9:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-18 9:27 [PATCH 1/3 -next] netfilter: nft_ct: labels get support Florian Westphal
2014-02-18 9:27 ` Florian Westphal [this message]
2014-02-18 9:27 ` [PATCH 3/3 nft] ct: connlabel matching support Florian Westphal
2014-02-18 10:09 ` Patrick McHardy
2014-02-18 9:58 ` [PATCH 1/3 -next] netfilter: nft_ct: labels get support Patrick McHardy
2014-02-18 10:13 ` Florian Westphal
2014-02-18 10:21 ` Patrick McHardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1392715644-4458-2-git-send-email-fw@strlen.de \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).