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; +} + extern bool __nf_ct_kill_acct(struct nf_conn *ct, enum ip_conntrack_info ctinfo, const struct sk_buff *skb, -- 1.7.0.4 -- 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