Message ID | 20231020173433.4611-2-phil@nwl.cc |
---|---|
State | Accepted, archived |
Headers | show |
Series | Refactor nft_obj_filter into nft_obj_dump_ctx | expand |
On Fri, Oct 20, 2023 at 07:34:28PM +0200, Phil Sutter wrote: > The code does not make use of cb->args fields past the first one, no > need to zero them. Series applied to nf-next, thanks
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index 20734fbb0d94..0f7ee76ad64f 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -7725,9 +7725,6 @@ static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb) goto cont; if (idx < s_idx) goto cont; - if (idx > s_idx) - memset(&cb->args[1], 0, - sizeof(cb->args) - sizeof(cb->args[0])); if (filter && filter->table && strcmp(filter->table, table->name)) goto cont;
The code does not make use of cb->args fields past the first one, no need to zero them. Signed-off-by: Phil Sutter <phil@nwl.cc> --- net/netfilter/nf_tables_api.c | 3 --- 1 file changed, 3 deletions(-)