]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Use a random query ID in our DNS messages
authorwessels <>
Sat, 7 May 2005 03:54:50 +0000 (03:54 +0000)
committerwessels <>
Sat, 7 May 2005 03:54:50 +0000 (03:54 +0000)
lib/rfc1035.c

index 800b77799130d3e3f36d5c035d0bc1d351921e7f..1bee20ed6bf7d37af90bb576699900a6ef0be076 100644 (file)
@@ -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;
 }