]> git.ipfire.org Git - thirdparty/ipset.git/commit
netfilter: ipset: fix hash:net,port,net hang with /0 subnet
authorJozsef Kadlecsik <kadlec@netfilter.org>
Thu, 29 Dec 2022 14:00:21 +0000 (15:00 +0100)
committerJozsef Kadlecsik <kadlec@netfilter.org>
Fri, 30 Dec 2022 11:21:16 +0000 (12:21 +0100)
commit8a6f0ec69115ba417c5ad06047040240991520ce
tree1d25ad826f2bf5140b65a58782c95e999fa44cab
parent7273a704502c78d653bcc350b55ea24bed44a37f
netfilter: ipset: fix hash:net,port,net hang with /0 subnet

The hash:net,port,net set type supports /0 subnets. However, the patch
commit 5f7b51bf09baca8e titled "netfilter: ipset: Limit the maximal range
of consecutive elements to add/delete" did not take into account it and
resulted in an endless loop. The bug is actually older but the patch
5f7b51bf09baca8e brings it out earlier.

Handle /0 subnets properly in hash:net,port,net set types.

Reported-by: Марк Коренберг <socketpair@gmail.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
kernel/net/netfilter/ipset/ip_set_hash_netportnet.c