]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Kill overloaded use of DNS ID 0 as "not successful".
authorhno <>
Mon, 9 May 2005 07:58:34 +0000 (07:58 +0000)
committerhno <>
Mon, 9 May 2005 07:58:34 +0000 (07:58 +0000)
lib/rfc1035.c
src/dns_internal.cc

index 1bee20ed6bf7d37af90bb576699900a6ef0be076..5479142cc0cdb33573683d299c8313211dd8938b 100644 (file)
@@ -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;
index baf5ed51864f8ba60ea2f476350f5dc00830ca84..0944105797b9cc4a2f7e665f72850dbe1729ad40 100644 (file)
@@ -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);
 }