mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
BUG/MINOR: logs: fix log-steps extra log origins selection
Willy noticed that it was not possible to select extra log origins using log-steps directive. Extra origins are the one registered using log_orig_register() such as http-req. Reason was the error path was always executed during extra log origin matching for log-steps parser, while it should only be executed if no match was found. It should be backported to 3.1.
This commit is contained in:
parent
f8e9545f70
commit
563b4fafc2
@ -6837,7 +6837,7 @@ static int px_parse_log_steps(char **args, int section_type, struct proxy *curpx
|
||||
|
||||
while (str[0]) {
|
||||
struct eb32_node *cur_step;
|
||||
enum log_orig_id cur_id;
|
||||
enum log_orig_id cur_id = LOG_ORIG_UNSPEC;
|
||||
|
||||
cur_sep = strcspn(str, ",");
|
||||
|
||||
@ -6862,6 +6862,7 @@ static int px_parse_log_steps(char **args, int section_type, struct proxy *curpx
|
||||
}
|
||||
}
|
||||
|
||||
if (cur_id == LOG_ORIG_UNSPEC) {
|
||||
memprintf(err,
|
||||
"invalid log step name (%.*s). Expected values are: "
|
||||
"accept, request, connect, response, close",
|
||||
@ -6871,6 +6872,7 @@ static int px_parse_log_steps(char **args, int section_type, struct proxy *curpx
|
||||
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
cur_step = malloc(sizeof(*cur_step));
|
||||
if (!cur_step) {
|
||||
|
Loading…
Reference in New Issue
Block a user