1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-17 21:03:56 +02:00
openwrt-packages/net/mtr/patches/502-fix-res_ninit.patch
Jonathan McCrohan a5ccfeaafe mtr: import from old packages
update from v0.82 to v0.85

set myself as maintainer

drop out of date patches:
patches/520-libresolv_fix.patch
patches/521-gtk_fix.patch

backport 25a2456 from upstream to fix glib dependency issue:
patches/521-glib-dependency-fixes.patch

Signed-off-by: Jonathan McCrohan <jmccrohan@gmail.com>
2014-07-19 14:18:37 +01:00

32 lines
967 B
Diff

--- a/dns.c
+++ b/dns.c
@@ -1305,28 +1305,6 @@ res_nmkquery(res_state statp,
return (-1);
memset(buf, 0, HFIXEDSZ);
hp = (HEADER *) buf;
- /* We randomize the IDs every time. The old code just
- incremented by one after the initial randomization which
- still predictable if the application does multiple
- requests. */
-#if 0
- hp->id = htons(++statp->id);
-#else
- hp->id = htons(statp->id);
- int randombits;
- do
- {
-#ifdef RANDOM_BITS
- RANDOM_BITS (randombits);
-#else
- struct timeval tv;
- gettimeofday (&tv, NULL);
- randombits = (tv.tv_sec << 8) ^ tv.tv_usec;
-#endif
- }
- while ((randombits & 0xffff) == 0);
- statp->id = (statp->id + randombits) & 0xffff;
-#endif
hp->opcode = op;
hp->rd = (statp->options & RES_RECURSE) != 0;
hp->rcode = NOERROR;