From: Willy Tarreau Date: Thu, 14 May 2026 22:43:17 +0000 (+0000) Subject: BUG/MINOR: resolvers: report the expression error in the do-resolve() action parser X-Git-Tag: v3.4-dev13~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b15e9b1b291a1fa36ea3e76f47f491c9dd57f15e;p=thirdparty%2Fhaproxy.git BUG/MINOR: resolvers: report the expression error in the do-resolve() action parser When an expression is used for do-resolve(), an error may be reported. Unfortunately it was scratched and replaced by the do-resolve() error, leaving no chance to know exactly what was wrong. Let's report the contents of the error when available. It will indicate identifiers that are not found or invalid ranges or types being used. This can be backported to all versions. --- diff --git a/src/resolvers.c b/src/resolvers.c index 463576acb..a3292ee85 100644 --- a/src/resolvers.c +++ b/src/resolvers.c @@ -3405,8 +3405,8 @@ enum act_parse_ret resolv_parse_do_resolve(const char **args, int *orig_arg, str ha_free(&rule->arg.resolv.varname); ha_free(&rule->arg.resolv.resolvers_id); ha_free(&rule->arg.resolv.opts); - memprintf(err, "Can't parse '%s'. Expects 'do-resolve(,[,]) '. Available options are 'ipv4' and 'ipv6'", - args[cur_arg]); + memprintf(err, "Can't parse '%s'%s%s. Expects 'do-resolve(,[,]) '. Available options are 'ipv4' and 'ipv6'", + args[cur_arg], *err ? ": " : "", *err ? *err : ""); return ACT_RET_PRS_ERR; }