Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ad66713f authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso
Browse files

netfilter: remove __nf_ct_kill_acct helper



After timer removal this just calls nf_ct_delete so remove the __ prefix
version and make nf_ct_kill a shorthand for nf_ct_delete.

Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent c023c0e4
Loading
Loading
Loading
Loading
+3 −10
Original line number Diff line number Diff line
@@ -219,21 +219,14 @@ static inline void nf_ct_refresh(struct nf_conn *ct,
	__nf_ct_refresh_acct(ct, 0, skb, extra_jiffies, 0);
}

bool __nf_ct_kill_acct(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
		       const struct sk_buff *skb, int do_acct);

/* kill conntrack and do accounting */
static inline bool nf_ct_kill_acct(struct nf_conn *ct,
				   enum ip_conntrack_info ctinfo,
				   const struct sk_buff *skb)
{
	return __nf_ct_kill_acct(ct, ctinfo, skb, 1);
}
bool nf_ct_kill_acct(struct nf_conn *ct, enum ip_conntrack_info ctinfo,
		     const struct sk_buff *skb);

/* kill conntrack without accounting */
static inline bool nf_ct_kill(struct nf_conn *ct)
{
	return __nf_ct_kill_acct(ct, 0, NULL, 0);
	return nf_ct_delete(ct, 0, 0);
}

/* These are for NAT.  Icky. */
+5 −7
Original line number Diff line number Diff line
@@ -1430,17 +1430,15 @@ void __nf_ct_refresh_acct(struct nf_conn *ct,
}
EXPORT_SYMBOL_GPL(__nf_ct_refresh_acct);

bool __nf_ct_kill_acct(struct nf_conn *ct,
bool nf_ct_kill_acct(struct nf_conn *ct,
		     enum ip_conntrack_info ctinfo,
		       const struct sk_buff *skb,
		       int do_acct)
		     const struct sk_buff *skb)
{
	if (do_acct)
	nf_ct_acct_update(ct, ctinfo, skb->len);

	return nf_ct_delete(ct, 0, 0);
}
EXPORT_SYMBOL_GPL(__nf_ct_kill_acct);
EXPORT_SYMBOL_GPL(nf_ct_kill_acct);

#if IS_ENABLED(CONFIG_NF_CT_NETLINK)