BUG/MEDIUM: servers state: server port is used uninitialized

Nenad spotted that the last fix was unfortunately wrong. Needs to be
backported to 1.6 as well.
This commit is contained in:
Willy Tarreau 2016-01-21 13:51:56 +01:00
parent a875b1f92e
commit f3c7a83acc

View File

@ -2162,7 +2162,7 @@ static void srv_update_state(struct server *srv, int version, char **params)
int port;
/* save the port, applies the new IP then reconfigure the port */
get_host_port(&srv->addr);
port = get_host_port(&srv->addr);
srv->addr.ss_family = addr.ss_family;
str2ip2(params[0], &srv->addr, srv->addr.ss_family);
set_host_port(&srv->addr, port);