]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
add new test for SRV records pointing at ., fix error within zoneparser that got...
authorbert hubert <bert.hubert@netherlabs.nl>
Wed, 12 Jun 2013 17:36:46 +0000 (19:36 +0200)
committerbert hubert <bert.hubert@netherlabs.nl>
Wed, 12 Jun 2013 17:38:14 +0000 (19:38 +0200)
pdns/zoneparser-tng.cc
regression-tests/root-srv/command [new file with mode: 0755]
regression-tests/root-srv/description [new file with mode: 0644]
regression-tests/root-srv/expected_result [new file with mode: 0644]
regression-tests/test.com

index f14f60be1f14b5126801d676e0595bc3cc91f124..1a44229b1560470ce4acfe0239d9930bbaff4a8e 100644 (file)
@@ -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;
diff --git a/regression-tests/root-srv/command b/regression-tests/root-srv/command
new file mode 100755 (executable)
index 0000000..d2e4853
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+cleandig _root._tcp.dc.test.com SRV
+
diff --git a/regression-tests/root-srv/description b/regression-tests/root-srv/description
new file mode 100644 (file)
index 0000000..9b4180c
--- /dev/null
@@ -0,0 +1 @@
+This test makes sure an SRV record pointing at the root works
diff --git a/regression-tests/root-srv/expected_result b/regression-tests/root-srv/expected_result
new file mode 100644 (file)
index 0000000..edc2b5a
--- /dev/null
@@ -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
index 2e8cffb99c16ac9511c7e117c22c317aa2d3c5d8..1f7f1c63de5f9a10d16f15700db7ccc9365947f9 100644 (file)
@@ -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"