trace: add support for TRACE_CT information
Florian Westphal
maintainerPATCH 1/1 trace: add support for TRACE_CT information
Decode direction/id/state/status information.
This will be used by 'nftables monitor trace' to print a packets conntrack state.
Signed-off-by Florian Westphal <[email protected]>
--- include/libnftnl/trace.h | 4 ++ include/linux/netfilter/nf_tables.h | 2 + src/trace.c | 78 +++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+)
include/libnftnl/trace.h +4 -0
@@ -28,6 +28,10 @@ enum nftnl_trace_attr {NFTNL_TRACE_VERDICT ,NFTNL_TRACE_NFPROTO ,NFTNL_TRACE_POLICY , +NFTNL_TRACE_CT_DIRECTION , +NFTNL_TRACE_CT_ID , +NFTNL_TRACE_CT_STATE , +NFTNL_TRACE_CT_STATUS , __NFTNL_TRACE_MAX, };#define NFTNL_TRACE_MAX (__NFTNL_TRACE_MAX - 1)
include/linux/netfilter/nf_tables.h +2 -0
@@ -1837,6 +1837,7 @@ enum nft_xfrm_keys {* @NFTA_TRACE_MARK: nfmark (NLA_U32) * @NFTA_TRACE_NFPROTO: nf protocol processed (NLA_U32) * @NFTA_TRACE_POLICY: policy that decided fate of packet (NLA_U32) +* @NFTA_TRACE_CT: connection tracking information (NLA_NESTED: nft_ct_keys) */ enum nft_trace_attributes {NFTA_TRACE_UNSPEC ,
@@ -1857,6 +1858,7 @@ enum nft_trace_attributes {NFTA_TRACE_NFPROTO ,NFTA_TRACE_POLICY ,NFTA_TRACE_PAD , +NFTA_TRACE_CT , __NFTA_TRACE_MAX };#define NFTA_TRACE_MAX (__NFTA_TRACE_MAX - 1)
src/trace.c +78 -0
107 lines not on this page · raw message
Signature · 1 line
2.49.0