]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: log: gracefully handle the "udp@" address format for log servers
authorWilly Tarreau <w@1wt.eu>
Wed, 16 Sep 2020 17:58:34 +0000 (19:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Sep 2020 18:11:52 +0000 (20:11 +0200)
commite1c4c80441cbffaf0236d9970582293ce0b9089c
treed042faa2584461bdfad547fa202c9c509ddcf2d8
parent70bf06e5f0823cd414bd1c9504a064c5de9fe97b
BUG/MINOR: log: gracefully handle the "udp@" address format for log servers

Commit 3835c0dcb ("MEDIUM: udp: adds minimal proto udp support for
message listeners.") introduced a problematic side effect in log server
address parser: if "udp@", "udp4@" or "udp6@" prefixes a log server's
address, the adress is passed as-is to the log server with a non-existing
family and fails like this when trying to send:

  [ALERT] 259/195708 (3474) : socket() failed in logger #1: Address family not supported by protocol (errno=97)

The problem is that till now there was no UDP family, so logs expect an
AF_INET family to be passed for UDP there.

This patch manually remaps AF_CUST_UDP4 and AF_CUST_UDP6 to their "tcp"
equivalent that the log server parser expects. No backport is needed.
src/log.c