netfilter: nf_conntrack: add efficient mark to zone mapping
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 14 Aug 2015 14:03:40 +0000 (16:03 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 17 Aug 2015 23:24:05 +0000 (01:24 +0200)
commit5e8018fc61423e677398d4ad4d72df70b9788e77
tree5605633fddd52cf0a677ad6f62fb8bb2e7a46054
parentdeedb59039f111c41aa5a54ee384c8e7c08bc78a
netfilter: nf_conntrack: add efficient mark to zone mapping

This work adds the possibility of deriving the zone id from the skb->mark
field in a scalable manner. This allows for having only a single template
serving hundreds/thousands of different zones, for example, instead of the
need to have one match for each zone as an extra CT jump target.

Note that we'd need to have this information attached to the template as at
the time when we're trying to lookup a possible ct object, we already need
to know zone information for a possible match when going into
__nf_conntrack_find_get(). This work provides a minimal implementation for
a possible mapping.

In order to not add/expose an extra ct->status bit, the zone structure has
been extended to carry a flag for deriving the mark.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack_zones.h
include/uapi/linux/netfilter/xt_CT.h
net/ipv4/netfilter/nf_conntrack_proto_icmp.c
net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
net/netfilter/nf_conntrack_core.c
net/netfilter/nf_conntrack_netlink.c
net/netfilter/xt_CT.c
This page took 0.037263 seconds and 5 git commands to generate.