* [PATCH nft 1/2] src: restore nft --debug
@ 2014-11-23 20:11 Pablo Neira Ayuso
2014-11-23 20:11 ` [PATCH nft 2/2] parser: restore named vmap Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Pablo Neira Ayuso @ 2014-11-23 20:11 UTC (permalink / raw)
To: netfilter-devel; +Cc: kaber, bjornar.ness
Add -DDEBUG to enable --debug option by default as it used to be before
the autotools conversion.
Fixes: 5fa8e49 ("build: autotools conversion")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
src/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 0a67810..e8afd46 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,7 +3,7 @@ sbin_PROGRAMS = nft
CLEANFILES = scanner.c parser_bison.c
AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CPPFLAGS += -DDEFAULT_INCLUDE_PATH="\"${sysconfdir}\""
+AM_CPPFLAGS += -DDEFAULT_INCLUDE_PATH="\"${sysconfdir}\"" -DDEBUG
${LIBMNL_CFLAGS} ${LIBNFTNL_CFLAGS}
AM_CFLAGS = -Wall \
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH nft 2/2] parser: restore named vmap
2014-11-23 20:11 [PATCH nft 1/2] src: restore nft --debug Pablo Neira Ayuso
@ 2014-11-23 20:11 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2014-11-23 20:11 UTC (permalink / raw)
To: netfilter-devel; +Cc: kaber, bjornar.ness
For example:
nft add map filter my_vmap { type ipv4_addr : verdict\; }
nft add element filter my_vmap { 1.0.0.0 : drop}
nft add rule filter input ip saddr vmap @my_vmap
Reported-by: Bjørnar Ness <bjornar.ness@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
src/parser_bison.y | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/parser_bison.y b/src/parser_bison.y
index 6eb0475..ad2951a 100644
--- a/src/parser_bison.y
+++ b/src/parser_bison.y
@@ -1211,6 +1211,13 @@ verdict_map_expr : '{' verdict_map_list_expr '}'
$2->location = @$;
$$ = $2;
}
+ | AT identifier
+ {
+ $$ = symbol_expr_alloc(&@$, SYMBOL_SET,
+ current_scope(state),
+ $2);
+ xfree($2);
+ }
;
verdict_map_list_expr : verdict_map_list_member_expr
@@ -1691,6 +1698,10 @@ set_list_member_expr : opt_newline expr opt_newline
{
$$ = mapping_expr_alloc(&@$, $2, $4);
}
+ | opt_newline map_lhs_expr COLON verdict_expr opt_newline
+ {
+ $$ = mapping_expr_alloc(&@$, $2, $4);
+ }
;
initializer_expr : expr
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-23 20:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-23 20:11 [PATCH nft 1/2] src: restore nft --debug Pablo Neira Ayuso
2014-11-23 20:11 ` [PATCH nft 2/2] parser: restore named vmap Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).