[rbldnsd] Bugfix (patch): improper NXDOMAIN return for combined dataset

Michael Tokarev mjt at tls.msk.ru
Wed Mar 9 17:26:27 MSK 2005


Just a sort of "announce" as I hasn't descided whenever to release
new version with just the fix...  As far as I can see this problem
is minor (ie, almost everything works just fine except of the
"base subzone query" itself), but it is worth fixing for ones
using `combined' dataset.

Host dul.dnsbl.sorbs.net not found: 3(NXDOMAIN)
2.0.0.127.dul.dnsbl.sorbs.net has address 127.0.0.10

Obviously dul.dnsbl.sorbs.net exists...

/mjt
-------------- next part --------------
For queries for base subzone in combined dataset,
rbldnsd improperly returned NXDOMAIN instead of NODATA -- eg
a query for sub.bl.example.com where sub is a subzone of
a combined dataset "rooted" at bl.example.com resulted in
NXDOMAIN while the name obviously does exists.

This patch fixes the problem.

/mjt

Index: rbldnsd_combined.c
diff -u -2 -p -r1.15 -r1.16
--- rbldnsd_combined.c	13 Dec 2004 01:22:31 -0000	1.15
+++ rbldnsd_combined.c	9 Mar 2005 14:20:36 -0000	1.16
@@ -192,5 +192,6 @@ ds_combined_query(const struct dataset *
     if (dsl->dsl_queryfn(dsl->dsl_ds, &sqi, pkt))
       found = 1;
-  return found;
+  /* if it was a query for our base subzone, always return `found' */
+  return found || !sqi.qi_dnlen;
 }
 


More information about the rbldnsd mailing list