From: hno <> Date: Mon, 9 May 2005 07:58:34 +0000 (+0000) Subject: Kill overloaded use of DNS ID 0 as "not successful". X-Git-Tag: SQUID_3_0_PRE4~765 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa6c61e317e9178e9e8a9d8fb410e3ed337ac55b;p=thirdparty%2Fsquid.git Kill overloaded use of DNS ID 0 as "not successful". --- diff --git a/lib/rfc1035.c b/lib/rfc1035.c index 1bee20ed6b..5479142cc0 100644 --- a/lib/rfc1035.c +++ b/lib/rfc1035.c @@ -1,6 +1,6 @@ /* - * $Id: rfc1035.c,v 1.37 2005/05/06 21:54:50 wessels Exp $ + * $Id: rfc1035.c,v 1.38 2005/05/09 01:58:34 hno Exp $ * * Low level DNS protocol routines * AUTHOR: Duane Wessels @@ -602,11 +602,6 @@ rfc1035BuildAQuery(const char *hostname, char *buf, size_t * szp) size_t offset = 0; size_t sz = *szp; memset(&h, '\0', sizeof(h)); - /* the first char of hostname must be alphanmeric */ - if (NULL == strchr(Alphanum, *hostname)) { - rfc1035SetErrno(3); - return 0; - } h.id = rfc1035Qid(); h.qr = 0; h.rd = 1; diff --git a/src/dns_internal.cc b/src/dns_internal.cc index baf5ed5186..0944105797 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.cc,v 1.68 2005/05/09 01:36:55 hno Exp $ + * $Id: dns_internal.cc,v 1.69 2005/05/09 01:58:34 hno Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -914,19 +914,17 @@ idnsALookup(const char *name, IDNSCB * callback, void *data) q->id = rfc1035BuildAQuery(name, q->buf, &q->sz); - if (0 == q->id) { - /* problem with query data -- query not sent */ - callback(data, NULL, 0, "Internal error"); - memFree(q, MEM_IDNS_QUERY); - return; - } - debug(78, 3) ("idnsALookup: buf is %d bytes for %s, id = %#hx\n", (int) q->sz, name, q->id); + q->callback = callback; + q->callback_data = cbdataReference(data); + q->start_t = current_time; + idnsCacheQuery(q, name); + idnsSendQuery(q); }