Browse Source

Patch from "Cho, Seong-Myun" <smcho@xecurenexus.com> to limit
things to the lower 16 bits of 'id'.

Eric Andersen 21 years ago
parent
commit
74f5887007
1 changed files with 3 additions and 1 deletions
  1. 3 1
      libc/inet/resolv.c

+ 3 - 1
libc/inet/resolv.c

@@ -641,7 +641,9 @@ int __dns_lookup(const char *name, int type, int nscount, char **nsip,
 
 		/* Mess with globals while under lock */
 		LOCK;
-		h.id = ++id;
+		++id;
+		id &= 0xffff;
+		h.id = id;
 		dns = nsip[ns];
 		UNLOCK;