diff --git a/doc/configuration.txt b/doc/configuration.txt index 80343a055..c424e5ea2 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -4550,9 +4550,11 @@ load-server-state-from-file { global | local | none } none don't load any stat for this backend Notes: - - server's IP address is not updated unless DNS resolution is enabled on - the server. It means that if a server IP address has been changed using - the stat socket, this information won't be re-applied after reloading. + - server's IP address is preserved across reloads by default, but the + order can be changed thanks to the server's "init-addr" setting. This + means that an IP address change performed on the CLI at run time will + be preserved, and that any change to the local resolver (eg: /etc/hosts) + will possibly not have any effect if the state file is in use. - server's weight is applied from previous running process unless it has has changed between previous and new configuration files. diff --git a/src/server.c b/src/server.c index a1deae8e7..5da95c999 100644 --- a/src/server.c +++ b/src/server.c @@ -2333,10 +2333,8 @@ static void srv_update_state(struct server *srv, int version, char **params) } server_recalc_eweight(srv); - /* load server IP only if DNS resolution is used on the server */ - if (srv->resolution) { - srv->lastaddr = strdup(params[0]); - } + /* load server IP address */ + srv->lastaddr = strdup(params[0]); break; default: chunk_appendf(msg, ", version '%d' not supported", version);