]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: tools: support specifying explicit address families in str2sa_range()
authorWilly Tarreau <w@1wt.eu>
Sun, 10 Mar 2013 20:32:12 +0000 (21:32 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 10 Mar 2013 21:46:55 +0000 (22:46 +0100)
commit24709286fed4b5154cd620d5bc7e767a950f0a3c
tree3714f05aed47290ffa633aaa8342965a0de70e81
parent902636fd736e24397a128777d5f8e20af9928dd9
MEDIUM: tools: support specifying explicit address families in str2sa_range()

This change allows one to force the address family in any address parsed
by str2sa_range() by specifying it as a prefix followed by '@' then the
address. Currently supported address prefixes are 'ipv4@', 'ipv6@', 'unix@'.
This also helps forcing resolving for host names (when getaddrinfo is used),
and force the family of the empty address (eg: 'ipv4@' = 0.0.0.0 while
'ipv6@' = ::).

The main benefits is that unix sockets can now get a local name without
being forced to begin with a slash. This is useful during development as
it is no longer necessary to have stats socket sent to /tmp.
doc/configuration.txt
include/common/standard.h
src/cfgparse.c
src/standard.c