linux/net/netfilter/ipset
Florent Fourcot cbdebe481a netfilter: ipset: forbid family for hash:mac sets
Userspace `ipset` command forbids family option for hash:mac type:

ipset create test hash:mac family inet4
ipset v6.30: Unknown argument: `family'

However, this check is not done in kernel itself. When someone use
external netlink applications (pyroute2 python library for example), one
can create hash:mac with invalid family and inconsistant results from
userspace (`ipset` command cannot read set content anymore).

This patch enforce the logic in kernel, and forbids insertion of
hash:mac with a family set.

Since IP_SET_PROTO_UNDEF is defined only for hash:mac, this patch has no
impact on other hash:* sets

Signed-off-by: Florent Fourcot <florent.fourcot@wifirst.fr>
Signed-off-by: Victorien Molle <victorien.molle@wifirst.fr>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
2018-06-06 14:01:00 +02:00
..
Kconfig
Makefile
ip_set_bitmap_gen.h
ip_set_bitmap_ip.c
ip_set_bitmap_ipmac.c
ip_set_bitmap_port.c
ip_set_core.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
ip_set_getport.c
ip_set_hash_gen.h netfilter: ipset: forbid family for hash:mac sets 2018-06-06 14:01:00 +02:00
ip_set_hash_ip.c
ip_set_hash_ipmac.c
ip_set_hash_ipmark.c
ip_set_hash_ipport.c
ip_set_hash_ipportip.c
ip_set_hash_ipportnet.c
ip_set_hash_mac.c netfilter: ipset: Use is_zero_ether_addr instead of static and memcmp 2018-03-30 12:20:44 +02:00
ip_set_hash_net.c
ip_set_hash_netiface.c
ip_set_hash_netnet.c
ip_set_hash_netport.c
ip_set_hash_netportnet.c
ip_set_list_set.c
pfxlen.c