]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nft_numgen: add number generation offset
authorLaura Garcia Liebana <nevola@gmail.com>
Tue, 13 Sep 2016 11:49:53 +0000 (13:49 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 22 Sep 2016 14:33:05 +0000 (16:33 +0200)
commitfe692f866496e1b4a2e41c05b7a24a36845dd22d
tree116f31f5533c7a0a97bf811417b18c81591e7540
parent9c66ec539a68fe772677523030034d5f75976ce0
netfilter: nft_numgen: add number generation offset

Add support of an offset value for incremental counter and random. With
this option the sysadmin is able to start the counter to a certain value
and then apply the generated number.

Example:

meta mark set numgen inc mod 2 offset 100

This will generate marks with the serie 100, 101, 100, 101, ...

Suggested-by: Pablo Neira Ayuso <pablo@netfilter.org>
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/nft_numgen.c