bugZoneCheck - Bugs: bug #21418, zonecheck fails to find name...

 
 

bug #21418: zonecheck fails to find name servers when local resolver is dnscache

Submitted by:  Charlie Brady <charlieb>
Submitted on:  Thu 25 Oct 2007 01:33:16 AM UTC  
 
Category: nresolvSeverity: High
Priority: 5 - NormalItem Group: Crash/Error
Status: FixedPrivacy: Public
Assigned to: NoneOpen/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 25 Oct 2007 03:14:57 AM UTC, comment #1:

I see that the problem seems to have been found and fixed, in this change which is included in zonecheck 2.0.4:

--- zonecheck-2.0.3/lib/nresolv/resolver.rb 2004-01-20 09:18:25.000000000 -0500
+++ zonecheck-2.0.4/lib/nresolv/resolver.rb 2004-05-03 07:41:57.000000000 -0400
@@ -232,7 +232,7 @@
if ipv4 && ipv6 then
list = getaddr(name, NResolv::DNS::Resource::IN::ANY,
[ RType::A, RType::AAAA ],
- [ RCode::NOTIMP ], true)
+ [ RCode::NOTIMP ], false)
end

if list.nil?

It would be a good idea for the download page to be updated to refer to version 2.0.4.

Charlie Brady <charlieb>
Thu 25 Oct 2007 01:33:16 AM UTC, original submission:

$ zonecheck --ipv4 charliebrady.org
ERROR: Unable to find nameserver IP address(es) for ns1.netfirms.com.
$

I think this is the same problem at that reported by Sebastien on zonecheck-dev in 2004:

http://lists.nongnu.org/archive/html/zonecheck-dev/2004-03/msg00001.html

The problem here is that zonecheck is sending requests to the local resolver (i.e. to dnscache) without the "recursion desired" bit set in the query. dnscache ignores such queries, which (some say) should only be sent to authoritative name servers. See:

http://homepages.tesco.net/~J.deBoynePollard/FGA/djbdns-myths-dispelled.html
http://cr.yp.to/djbdns/knowles.html

Making this change in the to_wire method in nresolv/wire.rb distributed with zonecheck allows zonecheck to work without reporting problems:

--- nresolv/wire.rb.orig 2007-10-20 13:01:03.000000000 -0400
+++ nresolv/wire.rb 2007-10-20 13:00:51.000000000 -0400
@@ -353,7 +353,7 @@
(@opcode.value) << 11 |
(@aa ? 1 : 0) << 10 |
(@tc ? 1 : 0) << 9 |
- (@rd ? 1 : 0) << 8 |
+ 1 << 8 |
(@ra ? 1 : 0) << 7 |
(@rcode.value))
encoder.pack('nnnn',

I'm certain that this isn't a fix to the problem, but does prove that the failure is related to the rd bit not being set in queries.

Charlie Brady <charlieb>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by chabannf (Updated the item)
  • -unavailable- added by charlieb (Submitted the item)
  • -unavailable- added by charlieb
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 12 Feb 2010 11:45:28 AM UTCchabannfOpen/ClosedOpen=>Closed
    Fri 05 Feb 2010 04:33:28 PM UTCchabannfStatusNone=>Fixed
    Thu 25 Oct 2007 01:33:16 AM UTCcharliebCarbon-Copy-=>Added charlieb

    Back to the top


    Powered by Savane 3.1-cleanup1