From: wessels <> Date: Sat, 7 May 2005 03:54:50 +0000 (+0000) Subject: Use a random query ID in our DNS messages X-Git-Tag: SQUID_3_0_PRE4~779 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4071272f9f05a2cea70ba22a820b9c7e68f74c95;p=thirdparty%2Fsquid.git Use a random query ID in our DNS messages --- diff --git a/lib/rfc1035.c b/lib/rfc1035.c index 800b777991..1bee20ed6b 100644 --- a/lib/rfc1035.c +++ b/lib/rfc1035.c @@ -1,6 +1,6 @@ /* - * $Id: rfc1035.c,v 1.36 2005/04/18 21:52:40 hno Exp $ + * $Id: rfc1035.c,v 1.37 2005/05/06 21:54:50 wessels Exp $ * * Low level DNS protocol routines * AUTHOR: Duane Wessels @@ -442,9 +442,7 @@ rfc1035RRUnpack(const char *buf, size_t sz, off_t * off, rfc1035_rr * RR) static unsigned short rfc1035Qid(void) { - static unsigned short qid = 0x0001; - if (++qid == 0xFFFF) - qid = 0x0001; + unsigned short qid = squid_random() & 0xFFFF; return qid; }