src: restore nft --debug
Pablo Neira Ayuso
maintainerPATCH 1/2 src: restore nft --debug
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 <[email protected]>
--- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/Makefile.am +1 -1
@@ -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 \
Signature · 1 line
1.7.10.4
Pablo Neira Ayuso
maintainerPATCH 2/2 parser: restore named vmap
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 <[email protected]>
Signed-off-by Pablo Neira Ayuso <[email protected]>
--- src/parser_bison.y | 11 +++++++++++ 1 file changed, 11 insertions(+)
src/parser_bison.y +11 -0
@@ -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
Signature · 6 lines
1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html