<div dir="ltr"><br><div class="gmail_quote">On Tue, Aug 5, 2008 at 1:22 PM, Michael Tokarev <span dir="ltr">&lt;<a href="mailto:mjt@tls.msk.ru">mjt@tls.msk.ru</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><a href="mailto:askthelist@gmail.com">askthelist@gmail.com</a> wrote:<br>
&gt; &nbsp; rbldnsd is returning &quot;Not Implemented&quot; in responses to requests in<br>
&gt; which the DNS AA (Authoritative Answer) bit is set... This may seem<br>
&gt; strange and an odd request, but Is there a way to configure rbldnsd to<br>
&gt; ignore this bit in requests and respond to the query anyway? If there is<br>
<br>
</div>Yes indeed this is strange, more than strange.</blockquote><div><br>Truth is stranger then fiction sometimes... <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
This bit is used for ANSWERS (as it&#39;s authoritative ANSWER), it can&#39;t<br>
be set in queries. &nbsp;Just like some other bits, like RA (recursion available).</blockquote><div><br>According to the RFC1035 this should be illegal, yet our Microsoft DNS Servers with forwards to our local rbldnsd&#39;s began sending queries with this bit set recently, not sure if it has anything do do with the recent dns patches that were released, but... Heres a debug that shows the bit being set...<br>
<br>20080804 21:30:35 728 PACKET&nbsp; 0000000002722CA0 UDP Snd x.x.x.x&nbsp;
d42a&nbsp;&nbsp; Q [0004 A&nbsp;&nbsp;&nbsp;&nbsp; NOERROR] A&nbsp;&nbsp;&nbsp;&nbsp;
(3)cnn(3)net(5)multi(5)surbl(3)org(0)<br>UDP question info<br>&nbsp; Socket = 4740, recvd on port (65535)<br>&nbsp; Remote addr x.x.x.x, port 53<br>&nbsp; Time Query=0, Queued=0, Expire=0<br>&nbsp; Buf length = 0x0500 (1280)<br>&nbsp; Msg length = 0x0029 (41)<br>
&nbsp; Message:<br>&nbsp;&nbsp;&nbsp; XID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0xd42a<br>&nbsp;&nbsp;&nbsp; Flags&nbsp;&nbsp;&nbsp;&nbsp; 0x0400<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 (QUESTION)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong><font color="#000000"> OPCODE&nbsp;&nbsp;&nbsp; 0 (QUERY)&nbsp;</font></strong><br><strong><font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 </font></strong><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TC&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Z&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RCODE&nbsp;&nbsp;&nbsp;&nbsp; 0 (NOERROR)<br>&nbsp;&nbsp;&nbsp; QCOUNT&nbsp;&nbsp;&nbsp; 1<br>&nbsp;&nbsp;&nbsp; ACOUNT&nbsp;&nbsp;&nbsp; 0<br>&nbsp;&nbsp;&nbsp; NSCOUNT&nbsp;&nbsp; 0<br>&nbsp;&nbsp;&nbsp; ARCOUNT&nbsp;&nbsp; 0<br>&nbsp;&nbsp;&nbsp; QUESTION SECTION:<br>&nbsp;&nbsp;&nbsp; Offset = 0x000c, RR count = 0<br>
&nbsp;&nbsp;&nbsp; Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;(3)cnn(3)net(5)multi(5)surbl(3)org(0)&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QTYPE&nbsp;&nbsp; A (1)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QCLASS&nbsp; 1<br>&nbsp;&nbsp;&nbsp; ANSWER SECTION:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; empty<br>&nbsp;&nbsp;&nbsp; AUTHORITY SECTION:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; empty<br>&nbsp;&nbsp;&nbsp; ADDITIONAL SECTION:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; empty&nbsp; </div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<div class="Ih2E3d"><br>
&gt; I couldnt find it and havent been able to find much documentation on the<br>
&gt; subject. I&#39;ve sifted through the source code and it seems the relevant<br>
&gt; code would be in the rbldnsd_packet.c/dns.h source files but since my C<br>
&gt; skills are non-existant it would be great if someone can provide a hack<br>
&gt; for me to implement this...<br>
<br>
</div>There&#39;s no config option for this, and yes it&#39;s in the source. &nbsp;In<br>
rbldnsd_packet.c file, in function named replypacket(), there&#39;s this<br>
code:<br>
<br>
 &nbsp; if (h[p_f1] &amp; (pf1_opcode | pf1_aa | pf1_tc | pf1_qr)) {<br>
 &nbsp; &nbsp; h[p_f1] = pf1_qr;<br>
 &nbsp; &nbsp; refuse(DNS_R_NOTIMPL);<br>
 &nbsp; }&nbsp;<br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
You can just comment it out. &nbsp;But this is WRONG. &nbsp;In a way similar to<br>
the way it drops packets when QR flag is set -- ie, when it&#39;s a<br>
reply, not a query. &nbsp;Imagine someone sends out a query with a fake<br>
source address equal to the address of the server itself -- the server<br>
replies to this packet, and the reply goes back to the same server,<br>
which now interprets the reply as new query and replies to it and<br>
so on ad infinitum... The bit you&#39;re talking about should NEVER, EVER<br>
be set in a query, and no sane DNS client software will set it.<br>
Something&#39;s seriously wrong on your client side.</blockquote><div><br>Great, thanks for the info. I seen that bit of code but was unsure how to manipulate it the way I needed to without breaking anything. I just need a bandaid until our vendor(Microsoft) can figure out why our server is behaving in this way and provide us either a solution or a workaround before our servers start getting banned from making too many dns requests...<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
And by the way, returning NOTIMPL here is questionable as well --<br>
maybe FORMERR is better. &nbsp;But in any way it&#39;s a clear error,<br>
clearly wrong packet, and I don&#39;t know how to implement its<br>
processing...<br>
<br>
/mjt</blockquote><div><br>Thanks. <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
_______________________________________________<br>
rbldnsd mailing list<br>
<a href="mailto:rbldnsd@corpit.ru">rbldnsd@corpit.ru</a><br>
<a href="http://www.corpit.ru/mailman/listinfo/rbldnsd" target="_blank">http://www.corpit.ru/mailman/listinfo/rbldnsd</a><br>
</blockquote></div><br></div>