Permalink
Browse files

add new test for SRV records pointing at ., fix error within zonepars…

…er that got confused by such root records
  • Loading branch information...
1 parent e6c7550 commit bf79c6a1f2a2183526ad056284c8c01226626642 @ahupowerdns ahupowerdns committed Jun 12, 2013
@@ -388,7 +388,8 @@ bool ZoneParserTNG::get(DNSResourceRecord& rr)
case QType::SRV:
stringtok(recparts, rr.content);
if(recparts.size()==4) {
- recparts[3] = stripDot(toCanonic(d_zonename, recparts[3]));
+ if(recparts[3]!=".")
+ recparts[3] = stripDot(toCanonic(d_zonename, recparts[3]));
rr.content=recparts[0]+" "+recparts[1]+" "+recparts[2]+" "+recparts[3];
}
break;
@@ -0,0 +1,3 @@
+#!/bin/sh
+cleandig _root._tcp.dc.test.com SRV
+
@@ -0,0 +1 @@
+This test makes sure an SRV record pointing at the root works
@@ -0,0 +1,3 @@
+0 _root._tcp.dc.test.com. IN SRV 3600 0 0 0 .
+Rcode: 0, RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='_root._tcp.dc.test.com.', qtype=SRV
@@ -24,6 +24,7 @@ counter IN A 1.1.1.5
_ldap._tcp.dc IN SRV 0 100 389 server2.example.net.
_double._tcp.dc IN SRV 0 100 389 server1
_double._tcp.dc IN SRV 1 100 389 server1
+_root._tcp.dc IN SRV 0 0 0 .
blah IN NS blah
blah IN A 192.168.6.1
;images IN URL "http://www.ds9a.nl"

0 comments on commit bf79c6a

Please sign in to comment.