]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: proto_ux: ability to dump ABNS names in error messages
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 6 Feb 2023 18:23:40 +0000 (19:23 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Feb 2023 14:05:05 +0000 (15:05 +0100)
commitde63efba5ad3c2ceb5942d0cb078c0fa823d93c9
tree5da9fc7e4d84626e05062d2e11679905c2c89ba1
parent2338dba18db3a895fd394a6c07544f03c7f39167
MINOR: proto_ux: ability to dump ABNS names in error messages

In sock_unix_bind_receiver(), uxst_bind_listener() and uxdg_bind_listener(),
properly dump ABNS socket names by leveraging sa2str() function which does the
hard work for us.

UNIX sockets are reported as is (unchanged) while ABNS UNIX sockets
are prefixed with 'abns@' to match the syntax used in config file.
(they where previously showing as empty strings because of the leading
NULL-byte that was not properly handled in this case)

This is only a minor debug improvement, however it could be useful to
backport it up to 2.4.
[for 2.4: you should replace "%s [%s]" by "%s for [%s]" for uxst and uxgd if
you wan't the patch to apply properly]
src/proto_uxdg.c
src/proto_uxst.c
src/sock_unix.c