OSDN Git Service

netfilter: ipset: Support package fragments for IPv4 protos without ports
authorAnders K. Pedersen <akp@surftown.com>
Fri, 3 May 2013 21:15:48 +0000 (23:15 +0200)
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Mon, 30 Sep 2013 19:33:26 +0000 (21:33 +0200)
commit60b0fe372499f66e0c965dc0594320438a3b711c
tree3a388eb587d0ce4bba35fb1abde411e6c8854fcc
parentb8cd97865c903e032db85e5a4f2783928c56f2bd
netfilter: ipset: Support package fragments for IPv4 protos without ports

Enable ipset port set types to match IPv4 package fragments for
protocols that doesn't have ports (or the port information isn't
supported by ipset).

For example this allows a hash:ip,port ipset containing the entry
192.168.0.1,gre:0 to match all package fragments for PPTP VPN tunnels
to/from the host. Without this patch only the first package fragment
(with fragment offset 0) was matched, while subsequent fragments wasn't.

This is not possible for IPv6, where the protocol is in the fragmented
part of the package unlike IPv4, where the protocol is in the IP header.

IPPROTO_ICMPV6 is deliberately not included, because it isn't relevant
for IPv4.

Signed-off-by: Anders K. Pedersen <akp@surftown.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
net/netfilter/ipset/ip_set_getport.c