Antwort: tinydns answers with "Not Implemented" if query sets AA flag
| Newsgroups | gmane.network.djbdns |
|---|---|
| Message-ID | <OF25549F55.26F20625-ONC125763A.002FFDD2-C125763A.00300ADA@vr-netze.de> |
FYI: seems to be a known issue at microsoft: http://support.microsoft.com/?scid=kb%3Ben-us%3B957930&x=18&y=10 *sigh* [email protected] 09/09/2009 12:30 PM An [email protected] Kopie Thema tinydns answers with "Not Implemented" if query sets AA flag Hi, we have a Windows Client here (a DC configured to forward queries for a domain to a tinydns nameserver) which sets the AA flag in the queries. That leads to a "Not Implemented" answer from tinydns. That check responsible for that is: server.c:54 if (header[2] & 126) goto NOTIMP; Let see those queries / first byte of the dns flags: A. a "normal" query like a bind nameserver would issue is B. a "broken" query issued by that windows client opcode | AA Q/R | |TC \ | ||RD | / \ ||| A 0 0000 001 B 0 0000 101 & 0 1111 110 A 0 0000 000 -> every thing is fine B 0 0000 100 -> tinydns sends NOTIMP rfc1035 says on that: AA Authoritative Answer - this bit is valid in responses, and specifies that the responding name server is an authority for the domain name in question section. So we may just say "Microsoft is doing bullshit there and the validation is correct" but I feel that the rfc leaves unclear what should happen in such a situation. I would prefer to just ignore that flag. My patch proposel is to just null that AA bit right before the check. What do you think about that? --- server.orig.c Wed Sep 9 10:49:28 2009 +++ server.c Wed Sep 9 11:43:20 2009 @@ -51,6 +51,7 @@ response[3] &= ~128; if (!(header[2] & 1)) response[2] &= ~1; + header[2] &= ~4; /* setting AA bit to 0 */ if (header[2] & 126) goto NOTIMP; if (byte_equal(qtype,2,DNS_T_AXFR)) goto NOTIMP; PS: Sorry if this mail is broken/html. I have to use that ugly notes ;)