Skip to content

Commit a6c46d9

Browse files
Florian Westphalummakynes
authored andcommitted
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 <[email protected]> Acked-by: Julian Anastasov <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent d0b35b9 commit a6c46d9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

net/netfilter/ipvs/ip_vs_nfct.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,13 +281,10 @@ void ip_vs_conn_drop_conntrack(struct ip_vs_conn *cp)
281281
h = nf_conntrack_find_get(cp->ipvs->net, &nf_ct_zone_dflt, &tuple);
282282
if (h) {
283283
ct = nf_ct_tuplehash_to_ctrack(h);
284-
/* Show what happens instead of calling nf_ct_kill() */
285-
if (del_timer(&ct->timeout)) {
286-
IP_VS_DBG(7, "%s: ct=%p, deleted conntrack timer for tuple="
284+
if (nf_ct_kill(ct)) {
285+
IP_VS_DBG(7, "%s: ct=%p, deleted conntrack for tuple="
287286
FMT_TUPLE "\n",
288287
__func__, ct, ARG_TUPLE(&tuple));
289-
if (ct->timeout.function)
290-
ct->timeout.function(ct->timeout.data);
291288
} else {
292289
IP_VS_DBG(7, "%s: ct=%p, no conntrack timer for tuple="
293290
FMT_TUPLE "\n",

0 commit comments

Comments
 (0)