summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2016-07-27 13:36:01 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-07-27 13:50:01 +0200
commit7947f4535af129290aa84d8173a8e5b2a296ed82 (patch)
tree4e9fb0e2384bbe47a2f63be0534579e085bcec0d /src
parent70f39ea15ef725bfb6126da6a493c73f5f387df2 (diff)
parser_bison: keep map flag around when flags are specified
If you add a map with timeouts, eg. # nft add table x # nft add map x y { type ipv4_addr : ipv4_addr\; flags timeout\; } The listing shows a set instead of a map: # nft list ruleset table ip x { set y { type ipv4_addr flags timeout } } This patch fixes the parser to keep the map flag around when timeout flag (or any other flags) are specified. This patch also comes with a regression test. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r--src/parser_bison.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 119fd09c..e16b8a32 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -1071,7 +1071,7 @@ map_block : /* empty */ { $$ = $<set>-1; }
}
| map_block FLAGS set_flag_list stmt_seperator
{
- $1->flags = $3;
+ $1->flags |= $3;
$$ = $1;
}
| map_block ELEMENTS '=' set_expr