]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netfilter: ipset: allocate the proper memory for the generic hash structure
authorJozsef Kadlecsik <kadlec@netfilter.org>
Thu, 2 Jul 2026 13:47:00 +0000 (15:47 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 8 Jul 2026 13:33:44 +0000 (15:33 +0200)
commit724f32699aeabcbd294377904b40b456fd5c67eb
treed6cab8baf89cbe8fa2e43bcfd6051663433c8eb0
parent672321302ed682ccb903004f435bbdb353534a9c
netfilter: ipset: allocate the proper memory for the generic hash structure

Because a single create function is emitted for every hash type,
from the IPv4 and IPv6 generic hash structure definitions the last
one, i.e. the IPv6 was in effect for IPv4 too. Use the proper size
when allocating the structure. Comment properly that because create()
refers to elements of the generic hash structure, all referred ones
must come before the IPv4/IPv6 dependent 'next' member.

Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/ipset/ip_set_hash_gen.h