diff options
-rw-r--r-- | src/netlink.c | 4 | ||||
-rw-r--r-- | src/parser_bison.y | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/netlink.c b/src/netlink.c index ef12cb01..e9779684 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -265,8 +265,8 @@ static struct expr *netlink_alloc_verdict(const struct location *loc, case NFT_GOTO: chain = constant_expr_alloc(loc, &string_type, BYTEORDER_HOST_ENDIAN, - NFT_CHAIN_MAXNAMELEN * - BITS_PER_BYTE, nld->chain); + strlen(nld->chain) * BITS_PER_BYTE, + nld->chain); break; default: chain = NULL; diff --git a/src/parser_bison.y b/src/parser_bison.y index 8026708e..5ffb5cc2 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -3824,8 +3824,8 @@ chain_expr : variable_expr { $$ = constant_expr_alloc(&@$, &string_type, BYTEORDER_HOST_ENDIAN, - NFT_CHAIN_MAXNAMELEN * - BITS_PER_BYTE, $1); + strlen($1) * BITS_PER_BYTE, + $1); } ; |