mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-16 03:37:05 +00:00
netfilter: ipset: do not call ipset_nest_end after nla_nest_cancel
In the error handling block, nla_nest_cancel(skb, atd) is called to
cancel the nest operation. But then, ipset_nest_end(skb, atd) is
unexpected called to end the nest operation. This patch calls the
ipset_nest_end only on the branch that nla_nest_cancel is not called.
Fixes: 45040978c8 ("netfilter: ipset: Fix set:list type crash when flush/dump set in parallel")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
530aad7701
commit
708abf74dd
1 changed files with 1 additions and 1 deletions
|
|
@ -531,8 +531,8 @@ nla_put_failure:
|
||||||
ret = -EMSGSIZE;
|
ret = -EMSGSIZE;
|
||||||
} else {
|
} else {
|
||||||
cb->args[IPSET_CB_ARG0] = i;
|
cb->args[IPSET_CB_ARG0] = i;
|
||||||
|
ipset_nest_end(skb, atd);
|
||||||
}
|
}
|
||||||
ipset_nest_end(skb, atd);
|
|
||||||
out:
|
out:
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue