summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLaura Garcia Liebana2016-09-13 13:49:53 +0200
committerPablo Neira Ayuso2016-09-22 16:33:05 +0200
commit2b03bf732488a3c2e920afe22c03b82cb8477e28 (patch)
tree116f31f5533c7a0a97bf811417b18c81591e7540 /include
parentnetfilter: nft_hash: fix hash overflow validation (diff)
downloadkernel-qcow2-linux-2b03bf732488a3c2e920afe22c03b82cb8477e28.tar.gz
kernel-qcow2-linux-2b03bf732488a3c2e920afe22c03b82cb8477e28.tar.xz
kernel-qcow2-linux-2b03bf732488a3c2e920afe22c03b82cb8477e28.zip
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>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/netfilter/nf_tables.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/netfilter/nf_tables.h b/include/uapi/linux/netfilter/nf_tables.h
index bc0eb6a1066d..bcfb892ff148 100644
--- a/include/uapi/linux/netfilter/nf_tables.h
+++ b/include/uapi/linux/netfilter/nf_tables.h
@@ -1136,12 +1136,14 @@ enum nft_trace_types {
* @NFTA_NG_DREG: destination register (NLA_U32)
* @NFTA_NG_MODULUS: maximum counter value (NLA_U32)
* @NFTA_NG_TYPE: operation type (NLA_U32)
+ * @NFTA_NG_OFFSET: offset to be added to the counter (NLA_U32)
*/
enum nft_ng_attributes {
NFTA_NG_UNSPEC,
NFTA_NG_DREG,
NFTA_NG_MODULUS,
NFTA_NG_TYPE,
+ NFTA_NG_OFFSET,
__NFTA_NG_MAX
};
#define NFTA_NG_MAX (__NFTA_NG_MAX - 1)