]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: dns: Don't set the check port during a server dns resolution
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 4 Feb 2021 09:39:56 +0000 (10:39 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 4 Feb 2021 09:42:52 +0000 (10:42 +0100)
When a server dns resolution is performed, there is no reason to set an
unconfigured check port with the server port. Because by default, if the
check port is not set, the server's one is used. Thus we can remove this
useless assignment. It is mandatory for next improvements.

src/dns.c

index 8c97df46b7c5cd2665af592b35d22ddca2ac57c4..69045ce69fe4a0e624312957f4699194532d24a7 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -712,9 +712,6 @@ static void dns_check_dns_response(struct dns_resolution *res)
 
                                srv->svc_port = item->port;
                                srv->flags   &= ~SRV_F_MAPPORTS;
-                               if ((srv->check.state & CHK_ST_CONFIGURED) &&
-                                   !(srv->flags & SRV_F_CHECKPORT))
-                                       srv->check.port = item->port;
 
                                if (!srv->dns_opts.ignore_weight) {
                                        char weight[9];