0a115fe0bebc07be48796a2369b452492a9782f2
[openwrt/staging/aparcar.git] /
1 From a220545c4277cba534be5ef4638b5076fc7d2cf4 Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Mon, 22 Oct 2018 18:21:48 +0100
4 Subject: [PATCH 02/32] Ensure that AD bit is reset on answers from
5 --address=/<domain>/<address>.
6
7 Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
8 ---
9 src/rfc1035.c | 6 +++---
10 1 file changed, 3 insertions(+), 3 deletions(-)
11
12 --- a/src/rfc1035.c
13 +++ b/src/rfc1035.c
14 @@ -938,9 +938,9 @@ size_t setup_reply(struct dns_header *he
15 return 0;
16
17 /* clear authoritative and truncated flags, set QR flag */
18 - header->hb3 = (header->hb3 & ~(HB3_AA | HB3_TC)) | HB3_QR;
19 - /* set RA flag */
20 - header->hb4 |= HB4_RA;
21 + header->hb3 = (header->hb3 & ~(HB3_AA | HB3_TC )) | HB3_QR;
22 + /* clear AD flag, set RA flag */
23 + header->hb4 = (header->hb4 & ~HB4_AD) | HB4_RA;
24
25 header->nscount = htons(0);
26 header->arcount = htons(0);