]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: server: Remove FQDN requirement for using init-addr and state file
authorNenad Merdanovic <nmerdan@haproxy.com>
Tue, 5 Sep 2017 13:32:47 +0000 (15:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 5 Sep 2017 13:52:58 +0000 (15:52 +0200)
Historically the DNS was the only way of updating the server IP dynamically
and the init-addr processing and state file load required the server to have
an FQDN defined. Given that we can now update the IP through the socket as
well and also can have different init-addr values (like IP and 'none') - this
requirement needs to be removed.

This patch should be backported to 1.7.

src/server.c

index c80c987006219f38128870e885983447803a81d2..67870b8dd1b5b4509363d6b6487002a2d0565564 100644 (file)
@@ -4276,8 +4276,7 @@ int srv_init_addr(void)
                        goto srv_init_addr_next;
 
                for (srv = curproxy->srv; srv; srv = srv->next)
-                       if (srv->hostname)
-                               return_code |= srv_iterate_initaddr(srv);
+                       return_code |= srv_iterate_initaddr(srv);
 
  srv_init_addr_next:
                curproxy = curproxy->next;