BUG/MEDIUM: log: fix config parse error logging on stdout/stderr or any raw fd
authorEmeric Brun <ebrun@haproxy.com>
Wed, 7 Apr 2021 12:26:44 +0000 (14:26 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Apr 2021 13:01:00 +0000 (15:01 +0200)
commit26754901e9338050339e00266ee0130a68f76eb9
tree3f8f623c41edaf56512acc0d8a6129ff8f75cc8a
parent94aab06e24237c1c0ca0cf13adba7decd5d4e633
BUG/MEDIUM: log: fix config parse error logging on stdout/stderr or any raw fd

The regression was introduced by commit previous commit 94aab06:
MEDIUM: log: support tcp or stream addresses on log lines.

This previous patch tries to retrieve the used protocol parsing
the address using the str2sa_range function but forgets that
the raw file descriptor adresses don't specify a protocol
and str2sa_range probes an error.

This patch re-work the str2sa_range function to stop
probing error if an authorized RAW_FD address is parsed
whereas the caller request also a protocol.

It also modify the code of parse_logsrv to switch on stream
logservers only if a protocol was detected.
src/log.c
src/tools.c