diff --git a/doc/management.txt b/doc/management.txt index 91c0340a2..932981bfc 100644 --- a/doc/management.txt +++ b/doc/management.txt @@ -1466,6 +1466,10 @@ add server / [args]* used to configure the server behavior. Also note that no settings will be reused from an hypothetical 'default-server' statement in the same backend. + Currently a dynamic server is statically initialized with the "none" + init-addr method. This means that no resolution will be undertaken if a FQDN + is specified as an address, even if the server creation will be validated. + Here is the list of the currently supported keywords : - backup diff --git a/src/server.c b/src/server.c index 043857478..62f0bcb89 100644 --- a/src/server.c +++ b/src/server.c @@ -4375,6 +4375,13 @@ static int cli_parse_add_server(char **args, char *payload, struct appctx *appct if (errcode) goto out; + /* A dynamic server does not currently support resolution. + * + * Initialize it explicitly to the "none" method to ensure no + * resolution will ever be executed. + */ + srv->init_addr_methods = SRV_IADDR_NONE; + if (srv->mux_proto) { if (!conn_get_best_mux_entry(srv->mux_proto->token, PROTO_SIDE_BE, be->mode)) { ha_alert("MUX protocol is not usable for server.\n");