haproxy/reg-tests/server
Tristan 18582ede05 MEDIUM: socket: add zero-terminated ABNS alternative
When an abstract unix socket is bound by HAProxy (using "abns@" prefix),
NUL bytes are appended at the end of its path until sun_path is filled
(for a total of 108 characters).

Here we add an alternative to pass only the non-NUL length of that path
to connect/bind calls, such that the effective path of the socket's name
is as humanly written. This may be useful to interconnect with existing
softwares that implement abstract sockets with this logic instead of the
default haproxy one.

This is achieved by implementing the "abnsz" socket prefix (instead of
"abns"), which stands for "zero-terminated ABNS". "abnsz" prefix may be
used anywhere "abns" is. Internally, haproxy uses the custom socket
family (AF_CUST_ABNS vs AF_CUST_ABNSZ) to differentiate default abns
sockets from zero-terminated ones.

Documentation was updated and regtest was added.

Fixes GH issues #977 and #2479

Co-authored-by: Aurelien DARRAGON <adarragon@haproxy.com>
2024-10-29 12:15:24 +01:00
..
abnsz.vtc MEDIUM: socket: add zero-terminated ABNS alternative 2024-10-29 12:15:24 +01:00
cli_add_check_server.vtc
cli_add_server.vtc
cli_add_ssl_server.vtc
cli_add_track_server.vtc
cli_delete_dynamic_server.vtc
cli_delete_server.vtc
cli_set_fqdn.vtc
cli_set_ssl.vtc
common.pem
get_srv_stats.lua