tim.gardner@xxxxxxxxxxxxx wrote:
From: Tim Gardner <tim.gardner@xxxxxxxxxxxxx>
Signed-off-by: Tim Gardner <tim.gardner@xxxxxxxxxxxxx>
---
include/net/netfilter/nf_conntrack.h | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index e624dae..2326754 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -232,6 +232,18 @@ static inline void nf_ct_refresh(struct nf_conn *ct,
__nf_ct_refresh_acct(ct, 0, skb, extra_jiffies, 0);
}
+/* Check if connection tracking accounting is enabled */
+static inline bool nf_ct_acct_enabled(struct nf_conn *ct)
+{
+ return ct->ct_net->ct.sysctl_acct == 0 ? false : true;
+}
+
+/* Enable/disable connection tracking accounting */
+static inline void nf_ct_set_acct(struct nf_conn *ct, bool enable)
+{
+ ct->ct_net->ct.sysctl_acct = enable == true ? 1 : 0;
+}
+
This looks strangely indented, please use a single tab. You also need
to take care of the CONFIG_NET_NS=n case where the ct_net pointer is
#ifdef'ed out. I'd suggest to simply pass the net pointer from
xt_mtchk_param, which is available unconditionally.
--
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