ipvs: use nf_ct_kill helper
Once timer is removed from nf_conn struct we cannot open-code the removal sequence anymore. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
d0b35b93d4
commit
a6c46d9bc9
|
@ -281,13 +281,10 @@ void ip_vs_conn_drop_conntrack(struct ip_vs_conn *cp)
|
||||||
h = nf_conntrack_find_get(cp->ipvs->net, &nf_ct_zone_dflt, &tuple);
|
h = nf_conntrack_find_get(cp->ipvs->net, &nf_ct_zone_dflt, &tuple);
|
||||||
if (h) {
|
if (h) {
|
||||||
ct = nf_ct_tuplehash_to_ctrack(h);
|
ct = nf_ct_tuplehash_to_ctrack(h);
|
||||||
/* Show what happens instead of calling nf_ct_kill() */
|
if (nf_ct_kill(ct)) {
|
||||||
if (del_timer(&ct->timeout)) {
|
IP_VS_DBG(7, "%s: ct=%p, deleted conntrack for tuple="
|
||||||
IP_VS_DBG(7, "%s: ct=%p, deleted conntrack timer for tuple="
|
|
||||||
FMT_TUPLE "\n",
|
FMT_TUPLE "\n",
|
||||||
__func__, ct, ARG_TUPLE(&tuple));
|
__func__, ct, ARG_TUPLE(&tuple));
|
||||||
if (ct->timeout.function)
|
|
||||||
ct->timeout.function(ct->timeout.data);
|
|
||||||
} else {
|
} else {
|
||||||
IP_VS_DBG(7, "%s: ct=%p, no conntrack timer for tuple="
|
IP_VS_DBG(7, "%s: ct=%p, no conntrack timer for tuple="
|
||||||
FMT_TUPLE "\n",
|
FMT_TUPLE "\n",
|
||||||
|
|
Loading…
Reference in New Issue