mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 14:21:25 +02:00
BUG/MINOR: resolvers: Add missing case-insensitive comparisons of DNS hostnames
DNS hostname comparisons were fixed to be case-insensitive (see b17b88487 "BUG/MEDIUM: dns: Consider the fact that dns answers are case-insensitive"). However 2 comparisons are still case-sensitive. This patch must be backported as far as 1.8.
This commit is contained in:
parent
31a3cea84f
commit
59b2925733
@ -3364,7 +3364,7 @@ struct server *snr_check_ip_callback(struct server *srv, void *ip, unsigned char
|
|||||||
HA_SPIN_LOCK(SERVER_LOCK, &tmpsrv->lock);
|
HA_SPIN_LOCK(SERVER_LOCK, &tmpsrv->lock);
|
||||||
if ((tmpsrv->hostname_dn == NULL) ||
|
if ((tmpsrv->hostname_dn == NULL) ||
|
||||||
(srv->hostname_dn_len != tmpsrv->hostname_dn_len) ||
|
(srv->hostname_dn_len != tmpsrv->hostname_dn_len) ||
|
||||||
(strcmp(srv->hostname_dn, tmpsrv->hostname_dn) != 0) ||
|
(strcasecmp(srv->hostname_dn, tmpsrv->hostname_dn) != 0) ||
|
||||||
(srv->puid == tmpsrv->puid)) {
|
(srv->puid == tmpsrv->puid)) {
|
||||||
HA_SPIN_UNLOCK(SERVER_LOCK, &tmpsrv->lock);
|
HA_SPIN_UNLOCK(SERVER_LOCK, &tmpsrv->lock);
|
||||||
continue;
|
continue;
|
||||||
@ -3443,7 +3443,8 @@ int srv_set_fqdn(struct server *srv, const char *hostname, int resolv_locked)
|
|||||||
resolution = (srv->resolv_requester ? srv->resolv_requester->resolution : NULL);
|
resolution = (srv->resolv_requester ? srv->resolv_requester->resolution : NULL);
|
||||||
if (resolution &&
|
if (resolution &&
|
||||||
resolution->hostname_dn &&
|
resolution->hostname_dn &&
|
||||||
strcmp(resolution->hostname_dn, hostname_dn) == 0)
|
resolution->hostname_dn_len == hostname_dn_len &&
|
||||||
|
strcasecmp(resolution->hostname_dn, hostname_dn) == 0)
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
resolv_unlink_resolution(srv->resolv_requester, 0);
|
resolv_unlink_resolution(srv->resolv_requester, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user