All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH libnftnl] src: Add ct id support
@ 2019-04-23 20:18 Brett Mastbergen
  0 siblings, 0 replies; only message in thread
From: Brett Mastbergen @ 2019-04-23 20:18 UTC (permalink / raw)
  To: netfilter-devel

The 'id' key returns the id of the connection entry

Signed-off-by: Brett Mastbergen <bmastbergen@untangle.com>
---
 include/linux/netfilter/nf_tables.h | 2 ++
 src/expr/ct.c                       | 1 +
 2 files changed, 3 insertions(+)

diff --git a/include/linux/netfilter/nf_tables.h b/include/linux/netfilter/nf_tables.h
index fd38cdc..6da0bf5 100644
--- a/include/linux/netfilter/nf_tables.h
+++ b/include/linux/netfilter/nf_tables.h
@@ -978,6 +978,7 @@ enum nft_osf_attributes {
  * @NFT_CT_SRC_IP6: conntrack layer 3 protocol source (IPv6 address)
  * @NFT_CT_DST_IP6: conntrack layer 3 protocol destination (IPv6 address)
  * @NFT_CT_TIMEOUT: connection tracking timeout policy assigned to conntrack
+ * @NFT_CT_ID: conntrack id
  */
 enum nft_ct_keys {
 	NFT_CT_STATE,
@@ -1004,6 +1005,7 @@ enum nft_ct_keys {
 	NFT_CT_SRC_IP6,
 	NFT_CT_DST_IP6,
 	NFT_CT_TIMEOUT,
+	NFT_CT_ID,
 	__NFT_CT_MAX
 };
 #define NFT_CT_MAX		(__NFT_CT_MAX - 1)
diff --git a/src/expr/ct.c b/src/expr/ct.c
index b9ca2dc..124de9d 100644
--- a/src/expr/ct.c
+++ b/src/expr/ct.c
@@ -172,6 +172,7 @@ static const char *ctkey2str_array[NFT_CT_MAX + 1] = {
 	[NFT_CT_DST_IP]		= "dst_ip",
 	[NFT_CT_SRC_IP6]	= "src_ip6",
 	[NFT_CT_DST_IP6]	= "dst_ip6",
+	[NFT_CT_ID]		= "id",
 };
 
 static const char *ctkey2str(uint32_t ctkey)
-- 
2.11.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-04-23 20:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-23 20:18 [PATCH libnftnl] src: Add ct id support Brett Mastbergen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.