BUG/MINOR: server: explicitly set "none" init-addr for dynamic servers
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 10 Jun 2021 15:34:10 +0000 (17:34 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 10 Jun 2021 15:44:05 +0000 (17:44 +0200)
commitefbf35caf9a3dcf9ead7bc07d140447e483a6bab
tree171727bb1cc534116caa30a9afc8d83e41fc591c
parent2a77c62c18261c50805dd1e1983dc28391a09a1d
BUG/MINOR: server: explicitly set "none" init-addr for dynamic servers

Define srv.init_addr_methods to SRV_IADDR_NONE on 'add server' CLI
handler. This explicitly states that no resolution will be made on the
server creation.

This is not a real bug as the default value (SRV_IADDR_END) has the same
effect in practice. However the intent is clearer and prevent to use the
default "libc,last" by mistake which cannot execute on runtime (blocking
call + file access via gethostbyname/getaddrinfo).

The doc is also updated to reflect this limitation.

This should be backported up to 2.4.
doc/management.txt
src/server.c