Ensure that AD bit is reset on answers from --address=/<domain>/<address>.

This commit is contained in:
Simon Kelley
2018-10-22 18:21:48 +01:00
parent a799ca0c63
commit a220545c42

View File

@@ -938,9 +938,9 @@ size_t setup_reply(struct dns_header *header, size_t qlen,
return 0;
/* clear authoritative and truncated flags, set QR flag */
header->hb3 = (header->hb3 & ~(HB3_AA | HB3_TC)) | HB3_QR;
/* set RA flag */
header->hb4 |= HB4_RA;
header->hb3 = (header->hb3 & ~(HB3_AA | HB3_TC )) | HB3_QR;
/* clear AD flag, set RA flag */
header->hb4 = (header->hb4 & ~HB4_AD) | HB4_RA;
header->nscount = htons(0);
header->arcount = htons(0);