mtr: remove some dead code
git-svn-id: svn://svn.openwrt.org/openwrt/packages@25784 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
96f5952064
commit
70753281c6
@ -25,21 +25,32 @@
|
|||||||
|
|
||||||
/* Code */
|
/* Code */
|
||||||
#ifdef CorruptCheck
|
#ifdef CorruptCheck
|
||||||
@@ -1274,7 +1274,7 @@ res_nmkquery(res_state statp,
|
@@ -1267,28 +1267,6 @@ res_nmkquery(res_state statp,
|
||||||
#if 0
|
return (-1);
|
||||||
hp->id = htons(++statp->id);
|
memset(buf, 0, HFIXEDSZ);
|
||||||
#else
|
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);
|
- hp->id = htons(statp->id);
|
||||||
+// hp->id = htons(statp->id);
|
- int randombits;
|
||||||
int randombits;
|
- do
|
||||||
do
|
- {
|
||||||
{
|
-#ifdef RANDOM_BITS
|
||||||
@@ -1287,7 +1287,7 @@ res_nmkquery(res_state statp,
|
- RANDOM_BITS (randombits);
|
||||||
#endif
|
-#else
|
||||||
}
|
- struct timeval tv;
|
||||||
while ((randombits & 0xffff) == 0);
|
- gettimeofday (&tv, NULL);
|
||||||
|
- randombits = (tv.tv_sec << 8) ^ tv.tv_usec;
|
||||||
|
-#endif
|
||||||
|
- }
|
||||||
|
- while ((randombits & 0xffff) == 0);
|
||||||
- statp->id = (statp->id + randombits) & 0xffff;
|
- statp->id = (statp->id + randombits) & 0xffff;
|
||||||
+// statp->id = (statp->id + randombits) & 0xffff;
|
-#endif
|
||||||
#endif
|
|
||||||
hp->opcode = op;
|
hp->opcode = op;
|
||||||
hp->rd = (statp->options & RES_RECURSE) != 0;
|
hp->rd = (statp->options & RES_RECURSE) != 0;
|
||||||
|
hp->rcode = NOERROR;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user