Skip to content

Commit

Permalink
netfilter: ipt_CLUSTERIP: Fix wrong conntrack netns refcnt usage
Browse files Browse the repository at this point in the history
Current codes invoke wrongly nf_ct_netns_get in the destroy routine,
it should use nf_ct_netns_put, not nf_ct_netns_get.
It could cause some modules could not be unloaded.

Fixes: ecb2421 ("netfilter: add and use nf_ct_netns_get/put")
Signed-off-by: Gao Feng <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
  • Loading branch information
gfreewind authored and ummakynes committed Apr 13, 2017
1 parent 79e09ef commit fe50543
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_CLUSTERIP.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ static void clusterip_tg_destroy(const struct xt_tgdtor_param *par)

clusterip_config_put(cipinfo->config);

nf_ct_netns_get(par->net, par->family);
nf_ct_netns_put(par->net, par->family);
}

#ifdef CONFIG_COMPAT
Expand Down

0 comments on commit fe50543

Please sign in to comment.