summaryrefslogtreecommitdiff
path: root/libc/inet
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inet')
-rw-r--r--libc/inet/resolv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c
index 62b091770..e6ac9d9ce 100644
--- a/libc/inet/resolv.c
+++ b/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;