]> granicus.if.org Git - ipset/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)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Wed, 13 Jan 2016 08:27:34 +0000 (09:27 +0100)
commit9b0be3d2545bfd0b482883bada1f4f0410b683ef
tree360278b59f4e31f91d70ca9539abccb494012def
parenta8013e5b2430e852207c9622cd881b686e464022
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>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
kernel/net/netfilter/ipset/ip_set_hash_netiface.c