]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitba692e11307244ac0cef20dc0ace3105a58ebff0
tree8ddccef3302ac5a16c42ecb4b12a2401d5c34510
parent8a0352348ced71962a28588485e4600fbc84439b
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