projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afed2b5
)
netfilter: nf_tables: Drop pointless memset when dumping rules
author
Phil Sutter
<phil@nwl.cc>
Fri, 29 Sep 2023 19:19:19 +0000
(21:19 +0200)
committer
Florian Westphal
<fw@strlen.de>
Tue, 10 Oct 2023 14:34:20 +0000
(16:34 +0200)
None of the dump callbacks uses netlink_callback::args beyond the first
element, no need to zero the data.
Fixes: 96518518cc41 ("netfilter: add nftables")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/nf_tables_api.c
patch
|
blob
|
history
diff --git
a/net/netfilter/nf_tables_api.c
b/net/netfilter/nf_tables_api.c
index ea30bee41a6eb0355995026e4e3faab01cd8068c..cd3c7dd15530374ee99ea1176ad4a4fd8e98771f 100644
(file)
--- a/
net/netfilter/nf_tables_api.c
+++ b/
net/netfilter/nf_tables_api.c
@@
-3465,10
+3465,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