summaryrefslogtreecommitdiff
path: root/net/key
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2015-04-11 09:46:42 (GMT)
committerPablo Neira Ayuso <pablo@netfilter.org>2015-04-13 18:19:55 (GMT)
commit3e135cd499bfbec15684fe9c756162d58df4dc77 (patch)
treeca4e87c29d799cdcc1e7698e7b2b9d75d6935d35 /net/key
parent7c6c6e95a12e46f499749bdd496e53d03950f377 (diff)
downloadlinux-3e135cd499bfbec15684fe9c756162d58df4dc77.tar.xz
netfilter: nft_dynset: dynamic stateful expression instantiation
Support instantiating stateful expressions based on a template that are associated with dynamically created set entries. The expressions are evaluated when adding or updating the set element. This allows to maintain per flow state using the existing set infrastructure and expression types, with arbitrary definitions of a flow. Usage is currently restricted to anonymous sets, meaning only a single binding can exist, since the desired semantics of multiple independant bindings haven't been defined so far. Examples (userspace syntax is still WIP): 1. Limit the rate of new SSH connections per host, similar to iptables hashlimit: flow ip saddr timeout 60s \ limit 10/second \ accept 2. Account network traffic between each set of /24 networks: flow ip saddr & 255.255.255.0 . ip daddr & 255.255.255.0 \ counter 3. Account traffic to each host per user: flow skuid . ip daddr \ counter 4. Account traffic for each combination of source address and TCP flags: flow ip saddr . tcp flags \ counter The resulting set content after a Xmas-scan look like this: { 192.168.122.1 . fin | psh | urg : counter packets 1001 bytes 40040, 192.168.122.1 . ack : counter packets 74 bytes 3848, 192.168.122.1 . psh | ack : counter packets 35 bytes 3144 } Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/key')
0 files changed, 0 insertions, 0 deletions