summaryrefslogtreecommitdiffstats
path: root/src/parser_bison.y
diff options
context:
space:
mode:
authorLaura Garcia Liebana <nevola@gmail.com>2019-06-17 18:15:41 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2019-06-28 18:53:29 +0200
commit24f33c710e8ce2fa93573573409d428236c2f6cb (patch)
treed133d71cd7450607105c93dea2e2251ec788f5f0 /src/parser_bison.y
parent2bb7528878c9571d629208d18acf338f2e7b2839 (diff)
src: enable set expiration date for set elements
Currently, the expiration of every element in a set or map is a read-only parameter generated at kernel side. This change will permit to set a certain expiration date per element that will be required, for example, during stateful replication among several nodes. This patch will enable the _expires_ input parameter in the parser and propagate NFTNL_SET_ELEM_EXPIRATION in order to send the configured value. 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.y5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 670e91f5..4f2e3475 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -255,6 +255,7 @@ int nft_lex(void *, void *, void *);
%token TIMEOUT "timeout"
%token GC_INTERVAL "gc-interval"
%token ELEMENTS "elements"
+%token EXPIRES "expires"
%token POLICY "policy"
%token MEMORY "memory"
@@ -3367,6 +3368,10 @@ set_elem_option : TIMEOUT time_spec
{
$<expr>0->timeout = $2;
}
+ | EXPIRES time_spec
+ {
+ $<expr>0->expiration = $2;
+ }
| comment_spec
{
$<expr>0->comment = $1;