]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: socket: always properly use the sock_domain for requested families
authorWilly Tarreau <w@1wt.eu>
Fri, 9 Aug 2024 17:37:44 +0000 (19:37 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 21 Aug 2024 15:36:58 +0000 (17:36 +0200)
commitd592ebdbeb298d725cceb6082eaa58d241b17675
treedcdb1f07b56256667c38d0d1200ffcccb395c9df
parentba4a416c66cee8f33bc4d877868e69470901ebad
MEDIUM: socket: always properly use the sock_domain for requested families

Now we make sure to always look up the protocol's domain for an address
family. Previously we would use it as-is, which prevented from properly
using custom addresses (which is when they differ).

This removes some hard-coded tests such as in log.c where UNIX vs UDP
was explicitly checked for example. It requires a bit of care, however,
so as to properly pass value 1 in the 3rd arg of the protocol_lookup()
for DGRAM stuff. Maybe one day we'll change these for defines or enums
to limit mistakes.
src/dns.c
src/log.c
src/resolvers.c
src/sock.c
src/tools.c