diff options
author | Laura Garcia Liebana <nevola@gmail.com> | 2016-10-22 23:36:07 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-10-27 21:46:43 +0200 |
commit | d4f9a8fb9e9acc09b0726e19e7c8e5faaa959803 (patch) | |
tree | 0277f97784fdda68d2e2acb6c8ba493135466a5f /src/parser_bison.y | |
parent | 8a7f6de536408336770e352cde939f8cb09a644d (diff) |
src: add offset attribute for numgen expression
Add support to add an offset to the numgen generated value.
Example:
ct mark set numgen inc mod 2 offset 100
This will generate marks with serie like 100, 101, 100, ...
Signed-off-by: Laura Garcia Liebana <nevola@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r-- | src/parser_bison.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y index f582221a..7377492b 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -2490,9 +2490,9 @@ numgen_type : INC { $$ = NFT_NG_INCREMENTAL; } | RANDOM { $$ = NFT_NG_RANDOM; } ; -numgen_expr : NUMGEN numgen_type MOD NUM +numgen_expr : NUMGEN numgen_type MOD NUM offset_opt { - $$ = numgen_expr_alloc(&@$, $2, $4); + $$ = numgen_expr_alloc(&@$, $2, $4, $5); } ; |