A bug lied in the parsing of DNS CNAME response, leading HAProxy to
think the CNAME was improperly resolved in the response.
This should be backported into 1.6 branch
else
ptr = reader;
- if (cname && memcmp(ptr, cname, cnamelen))
- return DNS_UPD_NAME_ERROR;
+ if (cname) {
+ if (memcmp(ptr, cname, cnamelen)) {
+ return DNS_UPD_NAME_ERROR;
+ }
+ }
else if (memcmp(ptr, dn_name, dn_name_len))
return DNS_UPD_NAME_ERROR;