netfilter: nf_tables: add number generator expression
authorLaura Garcia Liebana <nevola@gmail.com>
Thu, 18 Aug 2016 10:13:13 +0000 (12:13 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 22 Aug 2016 09:42:22 +0000 (11:42 +0200)
commit91dbc6be0a62d3bcea98287734d593610aed507d
tree99b45cb0fc627a16fa2418f806b13ea1c7b0669e
parent3d2f30a1df907e3ef4175121f0d21456630a72aa
netfilter: nf_tables: add number generator expression

This patch adds the numgen expression that allows us to generated
incremental and random numbers, this generator is bound to a upper limit
that is specified by userspace.

This expression is useful to distribute packets in a round-robin fashion
as well as randomly.

Signed-off-by: Laura Garcia Liebana <nevola@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/uapi/linux/netfilter/nf_tables.h
net/netfilter/Kconfig
net/netfilter/Makefile
net/netfilter/nft_numgen.c [new file with mode: 0644]