netfilter: ipset: allow a 0 netmask with hash_netiface type
authorFlorian Westphal <fw@strlen.de>
Tue, 12 Jan 2016 16:07:05 +0000 (17:07 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 13 Jan 2016 13:03:43 +0000 (14:03 +0100)
commitf90d2d37fb933773c9945c5939ae87aea2343057
tree8ddccef3302ac5a16c42ecb4b12a2401d5c34510
parent4b8c4eddfc941a38e5bc716a37e8c4292cefaa6d
netfilter: ipset: allow a 0 netmask with hash_netiface type

Jozsef says:
 The correct behaviour is that if we have
 ipset create test1 hash:net,iface
 ipset add test1 0.0.0.0/0,eth0
 iptables -A INPUT -m set --match-set test1 src,src

 then the rule should match for any traffic coming in through eth0.

This removes the -EINVAL runtime test to make matching work
in case packet arrived via the specified interface.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1297092
Signed-off-by: Florian Westphal <fw@strlen.de>
Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/ipset/ip_set_hash_netiface.c