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
..
ip_set_bitmap_gen.h netfilter: ipset: Fix "don't update counters" mode when counters used at the matching 2018-01-08 18:11:12 +01:00
ip_set_bitmap_ip.c netfilter: ipset: use swap macro instead of _manually_ swapping values 2018-01-08 18:11:11 +01:00
ip_set_bitmap_ipmac.c netfilter: ipset: use swap macro instead of _manually_ swapping values 2018-01-08 18:11:11 +01:00
ip_set_bitmap_port.c netfilter: ipset: use swap macro instead of _manually_ swapping values 2018-01-08 18:11:11 +01:00
ip_set_core.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
ip_set_getport.c sctp: remove the typedef sctp_sctphdr_t 2017-07-01 09:08:41 -07:00
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 netfilter: ipset: Fix adding an IPv4 range containing more than 2^31 addresses 2017-09-26 20:15:04 +02:00
ip_set_hash_ipmac.c netfilter: ipset: hash: fix boolreturn.cocci warnings 2016-11-10 13:28:50 +01:00
ip_set_hash_ipmark.c netfilter: ipset: Fix adding an IPv4 range containing more than 2^31 addresses 2017-09-26 20:15:04 +02:00
ip_set_hash_ipport.c netfilter: ipset: Fix adding an IPv4 range containing more than 2^31 addresses 2017-09-26 20:15:04 +02:00
ip_set_hash_ipportip.c netfilter: ipset: Fix adding an IPv4 range containing more than 2^31 addresses 2017-09-26 20:15:04 +02:00
ip_set_hash_ipportnet.c netfilter: ipset: Fix wraparound in hash:*net* types 2018-01-31 14:52:09 +01:00
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 netfilter: ipset: Fix wraparound in hash:*net* types 2018-01-31 14:52:09 +01:00
ip_set_hash_netiface.c netfilter: ipset: Fix wraparound in hash:*net* types 2018-01-31 14:52:09 +01:00
ip_set_hash_netnet.c netfilter: ipset: Fix wraparound in hash:*net* types 2018-01-31 14:52:09 +01:00
ip_set_hash_netport.c netfilter: ipset: Fix wraparound in hash:*net* types 2018-01-31 14:52:09 +01:00
ip_set_hash_netportnet.c netfilter: ipset: Fix wraparound in hash:*net* types 2018-01-31 14:52:09 +01:00
ip_set_list_set.c netfilter: ipset: Fix "don't update counters" mode when counters used at the matching 2018-01-08 18:11:12 +01:00
Kconfig netfilter: ipset: hash:ipmac type support added to ipset 2016-11-10 13:28:49 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pfxlen.c netfilter: ipset: deduplicate prefixlen maps 2017-10-04 16:19:06 +02:00