Bug 1237 - Wrong resolving in chain
Wrong resolving in chain
Status: RESOLVED FIXED
Product: unbound
Classification: Unclassified
Component: server
1.6.1
x86_64 FreeBSD
: P5 critical
Assigned To: unbound team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-17 15:26 CET by Ivan
Modified: 2017-03-17 15:34 CET (History)
2 users (show)

See Also:


Attachments
log for 2 query (25.58 KB, text/x-log)
2017-03-17 15:26 CET, Ivan
Details
log with 2 query (25.58 KB, text/plain)
2017-03-17 15:28 CET, Ivan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan 2017-03-17 15:26:20 CET
Created attachment 383 [details]
log for 2 query

I try to resolv same host name from same host it's work good (good result) but when I try to chain result trough unbound I got SERV FAIL (bad result).
Comment 1 Ivan 2017-03-17 15:28:23 CET
Created attachment 384 [details]
log with 2 query

deal with extension
Comment 2 Wouter Wijngaards 2017-03-17 15:32:56 CET
Hi Ivan,

I think this is the patch.  Based on your logs!

You are making queries without the +RD flag set by the way, which is really weird.  Normal queries should have the +RD flag set (the +norec option turns off the +RD flag in dig), so that unbound will recursively lookup.

The patch is also committed to the source repository.  Thanks for the report!

Best regards, Wouter

Index: iterator/iterator.c
===================================================================
--- iterator/iterator.c	(revision 4055)
+++ iterator/iterator.c	(working copy)
@@ -1351,7 +1351,7 @@
 
 	/* If the RD flag wasn't set, then we just finish with the 
 	 * cached referral as the response. */
-	if(!(qstate->query_flags & BIT_RD)) {
+	if(!(qstate->query_flags & BIT_RD) && iq->deleg_msg) {
 		iq->response = iq->deleg_msg;
 		if(verbosity >= VERB_ALGO && iq->response)
 			log_dns_msg("no RD requested, using delegation msg",
Comment 3 Wouter Wijngaards 2017-03-17 15:34:19 CET
Hi Ivan,

Thanks for the second attachment, it was at the same time as I wrote the patch.  I think the patch also works for that.

Best regards, Wouter