From: hno <> Date: Mon, 9 May 2005 07:36:55 +0000 (+0000) Subject: Kill assumption about DNS ID 0xFFFF never being used. X-Git-Tag: SQUID_3_0_PRE4~767 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4f3b04b78f3a89606141be76c50014b9a049a5d8;p=thirdparty%2Fsquid.git Kill assumption about DNS ID 0xFFFF never being used. --- diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 3270bb5e12..baf5ed5186 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.cc,v 1.67 2005/04/18 21:52:42 hno Exp $ + * $Id: dns_internal.cc,v 1.68 2005/05/09 01:36:55 hno Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -583,7 +583,7 @@ idnsGrokReply(const char *buf, size_t sz) { int n; rfc1035_rr *answers = NULL; - unsigned short rid = 0xFFFF; + unsigned short rid; idns_query *q; n = rfc1035AnswersUnpack(buf, @@ -592,9 +592,8 @@ idnsGrokReply(const char *buf, size_t sz) &rid); debug(78, 3) ("idnsGrokReply: ID %#hx, %d answers\n", rid, n); - if (rid == 0xFFFF) { - debug(78, 1) ("idnsGrokReply: Unknown error\n"); - /* XXX leak answers? */ + if (n == -15 /* rfc1035_unpack_error */ ) { + debug(78, 1) ("idnsGrokReply: Malformed DNS response\n"); return; }