netfilter: ipset: Make invalid MAC address checks consistent
authorStefano Brivio <sbrivio@redhat.com>
Fri, 17 Aug 2018 19:09:48 +0000 (21:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 Nov 2019 12:05:23 +0000 (13:05 +0100)
commitd8187ff32b23e4f83bc07976900d99f174540b0f
tree2eb280e31a5967905f55201260c4deb9306291ff
parentcb38a17cc8806fecb081cb93c085fcb67a1d4e55
netfilter: ipset: Make invalid MAC address checks consistent

[ Upstream commit 29edbc3ebdb0faa934114f14bf12fc0b784d4f1b ]

Set types bitmap:ipmac and hash:ipmac check that MAC addresses
are not all zeroes.

Introduce one missing check, and make the remaining ones
consistent, using is_zero_ether_addr() instead of comparing
against an array containing zeroes.

This was already done for hash:mac sets in commit 26c97c5d8dac
("netfilter: ipset: Use is_zero_ether_addr instead of static and
memcmp").

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/ipset/ip_set_bitmap_ipmac.c
net/netfilter/ipset/ip_set_hash_ipmac.c