Bug 1949 - [dnscrypt] make provider name mismatch more obvious
[dnscrypt] make provider name mismatch more obvious
Status: ASSIGNED
Product: unbound
Classification: Unclassified
Component: server
unspecified
Other All
: P5 enhancement
Assigned To: unbound team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-24 22:25 CEST by Manu Bretelle
Modified: 2017-10-25 12:14 CEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Manu Bretelle 2017-10-24 22:25:01 CEST
In https://github.com/jedisct1/dnscrypt-proxy/issues/760#issuecomment-339104609 the user got confused because it was not obvious that the qname was not matching. Adding quotes around names will make this easier to troubleshoot.

Suggested patch:

Index: daemon/worker.c
===================================================================
--- daemon/worker.c	(revision 4384)
+++ daemon/worker.c	(working copy)
@@ -1046,7 +1046,7 @@
 			strcasecmp(buf,
 			worker->daemon->dnscenv->provider_name) == 0)) {
 			verbose(VERB_ALGO,
-				"dnscrypt: not TXT %s. Receive: %s %s",
+				"dnscrypt: not TXT \"%s\". Receive: %s \"%s\"",
 				worker->daemon->dnscenv->provider_name,
 				sldns_rr_descript(qinfo.qtype)->_name,
 				buf);



This will turn the error message from:

dnscrypt: not TXT 2.dnscrypt-cert.example.com. Receive: TXT 2.dnsCRYpT-Cert.eXAmPle.cOm.

to

dnscrypt: not TXT "2.dnscrypt-cert.example.com.". Receive: TXT "2.dNscrypT-cERT.ExaMPlE.Com".
Comment 1 Ralph Dolmans 2017-10-25 12:14:02 CEST
Hi Manu,

I added the quotes. Also changed "receive" in "received", as suggested in the github issue. See patch below.

Thanks for reporting,
-- Ralph

Index: daemon/worker.c
===================================================================
--- daemon/worker.c	(revision 4385)
+++ daemon/worker.c	(working copy)
@@ -1046,7 +1046,7 @@
 			strcasecmp(buf,
 			worker->daemon->dnscenv->provider_name) == 0)) {
 			verbose(VERB_ALGO,
-				"dnscrypt: not TXT %s. Receive: %s %s",
+				"dnscrypt: not TXT \"%s\". Received: %s \"%s\"",
 				worker->daemon->dnscenv->provider_name,
 				sldns_rr_descript(qinfo.qtype)->_name,
 				buf);