diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-02-19 21:05:26 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-02-19 21:23:34 +0100 |
commit | 78bbe7f7a55be48909067e25900de27623d8fa6a (patch) | |
tree | 203fc630e89a9dbcfca98b9250d8113ee646937f /src/parser_bison.y | |
parent | f027cbf82445eec0c0f43e0025b5427bea467958 (diff) |
mnl: do not use expr->identifier to fetch device name
This string might not be nul-terminated, resulting in spurious errors
when adding netdev chains.
Fixes: 3fdc7541fba0 ("src: add multidevice support for netdev chain")
Fixes: 92911b362e90 ("src: add support to add flowtables")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/parser_bison.y')
-rw-r--r-- | src/parser_bison.y | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parser_bison.y b/src/parser_bison.y index ad512cdb..fd00b40a 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -1909,9 +1909,9 @@ flowtable_list_expr : flowtable_expr_member flowtable_expr_member : STRING { - $$ = symbol_expr_alloc(&@$, SYMBOL_VALUE, - current_scope(state), - $1); + $$ = constant_expr_alloc(&@$, &string_type, + BYTEORDER_HOST_ENDIAN, + strlen($1) * BITS_PER_BYTE, $1); xfree($1); } ; |