[Pdns-dev] pipebackend and SRV records

Daniel Drown dan-pdns at drown.org
Tue Nov 24 20:57:04 CET 2009


I noticed that SRV records are not doing what I expected when using the
pipebackend.

If my pipebackend responds with:

first response format:
DATA\t_sip._tcp.test.example\tIN\tSRV\t14400\t5\t10\t10 8080 ns1.test.example\n
second response format:
DATA\t_sip._tcp.test.example\tIN\tSRV\t14400\t5\t10 10 8080 ns1.test.example\n

I get the same response (priority=0 and everything shifted over):
_sip._tcp.test.example. 14400   IN      SRV     0 10 10 8080.

Using the attached patch (handles SRV records like MX) and the first response
format, I get:
_sip._tcp.test.example. 14400   IN      SRV     10 10 8080 ns1.test.example.

Downside is that things that were silently breaking before (second response
format) now give an error message:

Nov 24 14:50:51 [PIPEBackend] coprocess returned incomplete MX line in data
section for query for _sip._tcp.test.example
Nov 24 14:50:51 Backend error: Format error communicating with coprocess in
data section of MX record

Comments?  Am I overlooking something?
-------------- next part --------------
--- modules/pipebackend/pipebackend.cc.orig	2009-11-24 14:19:15.000000000 -0500
+++ modules/pipebackend/pipebackend.cc	2009-11-24 14:18:43.000000000 -0500
@@ -220,7 +220,7 @@
          r.ttl=atoi(parts[4].c_str());
          r.domain_id=atoi(parts[5].c_str());
  
-	 if(parts[3]!="MX") {
+	 if((parts[3]!="MX") && (parts[3]!="SRV")) { // types with priority
 	   r.content.clear();
 	   for(int n=6; n < parts.size(); ++n) {
 	     if(n!=6)


More information about the Pdns-dev mailing list