netfilter: ipset: Make invalid MAC address checks consistent
authorStefano Brivio <sbrivio@redhat.com>
Fri, 17 Aug 2018 19:09:48 +0000 (21:09 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Mon, 22 Oct 2018 21:17:04 +0000 (23:17 +0200)
commit29edbc3ebdb0faa934114f14bf12fc0b784d4f1b
tree36c929b943de55d2c7e60af070d559a2ba663b4d
parent8cc4ccf58379935f3ad456cc34e61c4e4c921d0e
netfilter: ipset: Make invalid MAC address checks consistent

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>
net/netfilter/ipset/ip_set_bitmap_ipmac.c
net/netfilter/ipset/ip_set_hash_ipmac.c