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

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