Logic in the test was inverted. The result was the jump string
not to be set.
Reported-by: Alex Chapman <ajchapman88@hotmail.co.uk>
Signed-off-by: Eric Leblond <eric@regit.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
nft_rule_expr_set(nle, NFT_EXPR_IMM_DATA, nld.value, nld.len);
break;
case EXPR_VERDICT:
- if (nft_rule_expr_is_set(nle, NFT_EXPR_IMM_CHAIN)) {
+ if ((expr->chain != NULL) &&
+ !nft_rule_expr_is_set(nle, NFT_EXPR_IMM_CHAIN)) {
nft_rule_expr_set_str(nle, NFT_EXPR_IMM_CHAIN,
nld.chain);
}