]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: tools: make str2sa_range() optionally return the FQDN
authorWilly Tarreau <w@1wt.eu>
Tue, 8 Sep 2015 13:50:19 +0000 (15:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 8 Sep 2015 13:50:19 +0000 (15:50 +0200)
commit72b8c1f0aa1dba22112a84bf5fe17bcae30d062f
treebf1d218902ea59672b3a7370d2206b15b77d9e4b
parent90447582d79a773f66dc3ef1ea2c0cbbc8da5ad3
MEDIUM: tools: make str2sa_range() optionally return the FQDN

The function does a bunch of things among which resolving environment
variables, skipping address family specifiers and trimming port ranges.
It is the only one which sees the complete host name before trying to
resolve it. The DNS resolving code needs to know the original hostname,
so we modify this function to optionally provide it to the caller.

Note that the function itself doesn't know if the host part was a host
or an address, but str2ip() knows that and can be asked not to try to
resolve. So we first try to parse the address without resolving and
try again with resolving enabled. This way we know if the address is
explicit or needs some kind of resolution.
include/common/standard.h
src/cfgparse.c
src/server.c
src/standard.c