Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5add189

Browse files
Jozsef Kadlecsikummakynes
authored andcommitted
netfilter: ipset: bitmap:ip,mac: fix listing with timeout
The type when timeout support was enabled, could not list all elements, just the first ones which could fit into one netlink message: it just did not continue listing after the first message. Reported-by: Yoann JUET <[email protected]> Signed-off-by: Jozsef Kadlecsik <[email protected]> Tested-by: Yoann JUET <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent c2d421e commit 5add189

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

net/netfilter/ipset/ip_set_bitmap_ipmac.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,11 @@ bitmap_ipmac_tlist(const struct ip_set *set,
339339
nla_put_failure:
340340
nla_nest_cancel(skb, nested);
341341
ipset_nest_end(skb, atd);
342-
return -EMSGSIZE;
342+
if (unlikely(id == first)) {
343+
cb->args[2] = 0;
344+
return -EMSGSIZE;
345+
}
346+
return 0;
343347
}
344348

345349
static int

0 commit comments

Comments
 (0)