mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-26 19:22:57 -04:00
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.
This commit is contained in:
parent
0c8c9b1c2a
commit
b15e9b1b29
1 changed files with 2 additions and 2 deletions
|
|
@ -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(<varname>,<resolvers>[,<options>]) <expr>'. Available options are 'ipv4' and 'ipv6'",
|
||||
args[cur_arg]);
|
||||
memprintf(err, "Can't parse '%s'%s%s. Expects 'do-resolve(<varname>,<resolvers>[,<options>]) <expr>'. Available options are 'ipv4' and 'ipv6'",
|
||||
args[cur_arg], *err ? ": " : "", *err ? *err : "");
|
||||
return ACT_RET_PRS_ERR;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue