[PATCH libnftnl 1/6] src: ct: add packet and byte counter support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Florian Westphal <fw@xxxxxxxxx>
---
 include/linux/netfilter/nf_tables.h | 2 ++
 src/expr/ct.c                       | 4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/linux/netfilter/nf_tables.h b/include/linux/netfilter/nf_tables.h
index f77693b..7091d91 100644
--- a/include/linux/netfilter/nf_tables.h
+++ b/include/linux/netfilter/nf_tables.h
@@ -755,6 +755,8 @@ enum nft_ct_keys {
 	NFT_CT_PROTO_SRC,
 	NFT_CT_PROTO_DST,
 	NFT_CT_LABELS,
+	NFT_CT_PKTS,
+	NFT_CT_BYTES,
 };
 
 /**
diff --git a/src/expr/ct.c b/src/expr/ct.c
index 584dffe..4bee6b1 100644
--- a/src/expr/ct.c
+++ b/src/expr/ct.c
@@ -32,7 +32,7 @@ struct nftnl_expr_ct {
 #define IP_CT_DIR_REPLY		1
 
 #ifndef NFT_CT_MAX
-#define NFT_CT_MAX (NFT_CT_LABELS + 1)
+#define NFT_CT_MAX (NFT_CT_BYTES + 1)
 #endif
 
 static int
@@ -167,6 +167,8 @@ const char *ctkey2str_array[NFT_CT_MAX] = {
 	[NFT_CT_PROTO_SRC]	= "proto_src",
 	[NFT_CT_PROTO_DST]	= "proto_dst",
 	[NFT_CT_LABELS]		= "label",
+	[NFT_CT_PKTS]		= "packets",
+	[NFT_CT_BYTES]		= "bytes",
 };
 
 static const char *ctkey2str(uint32_t ctkey)
-- 
2.4.10

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux