diff options
author | Florian Westphal <fw@strlen.de> | 2022-04-11 14:01:24 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-05-13 19:53:27 +0300 |
commit | 8a75a2c1741073f0c2d7bee146648e717527e048 (patch) | |
tree | 27d60c82fe6cf5d32c65cb58810966c4e6bdfcc6 /net/netfilter/nf_conntrack_netlink.c | |
parent | ace53fdc262fa6751acd3d61f3236f84ae3340f1 (diff) | |
download | linux-8a75a2c1741073f0c2d7bee146648e717527e048.tar.xz |
netfilter: conntrack: remove unconfirmed list
It has no function anymore and can be removed.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_conntrack_netlink.c')
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 2e9c8183e4a2..eafe640b3387 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c @@ -1752,49 +1752,7 @@ static int ctnetlink_dump_one_entry(struct sk_buff *skb, static int ctnetlink_dump_unconfirmed(struct sk_buff *skb, struct netlink_callback *cb) { - struct ctnetlink_list_dump_ctx *ctx = (void *)cb->ctx; - struct nf_conn *ct, *last; - struct nf_conntrack_tuple_hash *h; - struct hlist_nulls_node *n; - struct net *net = sock_net(skb->sk); - int res, cpu; - - if (ctx->done) - return 0; - - last = ctx->last; - - for (cpu = ctx->cpu; cpu < nr_cpu_ids; cpu++) { - struct ct_pcpu *pcpu; - - if (!cpu_possible(cpu)) - continue; - - pcpu = per_cpu_ptr(net->ct.pcpu_lists, cpu); - spin_lock_bh(&pcpu->lock); -restart: - hlist_nulls_for_each_entry(h, n, &pcpu->unconfirmed, hnnode) { - ct = nf_ct_tuplehash_to_ctrack(h); - - res = ctnetlink_dump_one_entry(skb, cb, ct, false); - if (res < 0) { - ctx->cpu = cpu; - spin_unlock_bh(&pcpu->lock); - goto out; - } - } - if (ctx->last) { - ctx->last = NULL; - goto restart; - } - spin_unlock_bh(&pcpu->lock); - } - ctx->done = true; -out: - if (last) - nf_ct_put(last); - - return skb->len; + return 0; } static int |