Support of key and value association with a certain timeout.

Example:

nft add map nftlb mapa { type inet_service: ipv4_addr\;
 timeout 5s\; }

Results in:

table ip nftlb {
        map mapa {
                type inet_service : ipv4_addr
                timeout 5s
        }
}

Signed-off-by: Laura Garcia Liebana <nev...@gmail.com>
---
 src/parser_bison.y | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/parser_bison.y b/src/parser_bison.y
index df672b1..0c9e6c2 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -1462,6 +1462,11 @@ map_block_alloc          :       /* empty */
 map_block              :       /* empty */     { $$ = $<set>-1; }
                        |       map_block       common_block
                        |       map_block       stmt_separator
+                       |       map_block       TIMEOUT         time_spec       
stmt_separator
+                       {
+                               $1->timeout = $3 * 1000;
+                               $$ = $1;
+                       }
                        |       map_block       TYPE
                                                data_type_expr  COLON   
data_type_expr
                                                stmt_separator
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to