mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
netfilter: nf_tables: Drop pointless memset when dumping rules
[ Upstream commit 30fa41a0f6df4c85790cc6499ddc4a926a113bfa ]
None of the dump callbacks uses netlink_callback::args beyond the first
element, no need to zero the data.
Fixes: 96518518cc ("netfilter: add nftables")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
80986257d2
commit
bfd4ed4988
@@ -3184,10 +3184,6 @@ static int __nf_tables_dump_rules(struct sk_buff *skb,
|
||||
goto cont_skip;
|
||||
if (*idx < s_idx)
|
||||
goto cont;
|
||||
if (*idx > s_idx) {
|
||||
memset(&cb->args[1], 0,
|
||||
sizeof(cb->args) - sizeof(cb->args[0]));
|
||||
}
|
||||
if (prule)
|
||||
handle = prule->handle;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user