summaryrefslogtreecommitdiffstats
path: root/src/evaluate.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2020-02-20 12:58:40 +0100
committerFlorian Westphal <fw@strlen.de>2020-02-22 09:54:25 +0100
commitdbfcb1fa29da670ae565caef48760b9ac1c21a0b (patch)
tree3a77bdc993de5d0506e6f8b02beb95478ea9ae28 /src/evaluate.c
parent78bbe7f7a55be48909067e25900de27623d8fa6a (diff)
evaluate: print correct statement name on family mismatch
nft add rule inet filter c ip daddr 1.2.3.4 dnat ip6 to f00::1 Error: conflicting protocols specified: ip vs. unknown. You must specify ip or ip6 family in tproxy statement Should be: ... "in nat statement". Fixes: fbe27464dee4588d90 ("src: add nat support for the inet family") Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src/evaluate.c')
-rw-r--r--src/evaluate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/evaluate.c b/src/evaluate.c
index a3cbf939..ae629abe 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -2807,9 +2807,10 @@ static int stmt_evaluate_l3proto(struct eval_ctx *ctx,
(nproto == &proto_ip6 && family != NFPROTO_IPV6))
return stmt_binary_error(ctx, stmt,
&ctx->pctx.protocol[PROTO_BASE_NETWORK_HDR],
- "conflicting protocols specified: %s vs. %s. You must specify ip or ip6 family in tproxy statement",
+ "conflicting protocols specified: %s vs. %s. You must specify ip or ip6 family in %s statement",
ctx->pctx.protocol[PROTO_BASE_NETWORK_HDR].desc->name,
- family2str(stmt->tproxy.family));
+ family2str(family),
+ stmt->ops->name);
return 0;
}