diff --git a/src/proxy.c b/src/proxy.c index 31253f14d..6f71b4b4c 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -1450,6 +1450,9 @@ static int dump_servers_state(struct stream_interface *si, struct chunk *buf) inet_ntop(srv->addr.ss_family, &((struct sockaddr_in6 *)&srv->addr)->sin6_addr, srv_addr, INET6_ADDRSTRLEN + 1); break; + default: + memcpy(srv_addr, "-\0", 2); + break; } srv_time_since_last_change = now.tv_sec - srv->last_change; bk_f_forced_id = px->options & PR_O_FORCED_ID ? 1 : 0; diff --git a/src/server.c b/src/server.c index ebac357fb..277d1405e 100644 --- a/src/server.c +++ b/src/server.c @@ -2936,7 +2936,8 @@ static void srv_update_state(struct server *srv, int version, char **params) server_recalc_eweight(srv); /* load server IP address */ - srv->lastaddr = strdup(params[0]); + if (strcmp(params[0], "-")) + srv->lastaddr = strdup(params[0]); if (fqdn && srv->hostname) { if (!strcmp(srv->hostname, fqdn)) {