From: James Antill <james@and.org>
To: Olaf Kirch <okir@caldera.de>
Cc: linux-kernel@vger.kernel.org, security-audit@ferret.lmh.ox.ac.uk
Subject: Re: Traceroute without s bit
Date: 06 Dec 2000 10:35:14 -0500 [thread overview]
Message-ID: <nnitoxh8b1.fsf@code.and.org> (raw)
In-Reply-To: <20001206135019.L9533@monad.caldera.de>
In-Reply-To: Olaf Kirch's message of "Wed, 6 Dec 2000 13:50:19 +0100"
Olaf Kirch <okir@caldera.de> writes:
> 3. There seems to be a bug somewhere in the handling of poll().
> If you observe the traceroute process with strace, you'll
> notice that it starts spinning madly after receiving the
> first bunch of packets (those with ttl 1).
>
> 13:43:02 poll([{fd=4, events=POLLERR}], 1, 5) = 0
> 13:43:02 poll([{fd=4, events=POLLERR}], 1, 5) = 0
> 13:43:02 poll([{fd=4, events=POLLERR}], 1, 5) = 0
> 13:43:02 poll([{fd=4, events=POLLERR}], 1, 5) = 0
> ...
>
> I.e. the poll call returns as if it had timed out, but it
> hasn't.
I've just looked at it, but I'm pretty sure this is a bug in your
code. This should fix it...
--- traceroute.c.orig Wed Dec 6 10:33:48 2000
+++ traceroute.c Wed Dec 6 10:34:06 2000
@@ -193,7 +193,7 @@
timeout = hop->nextsend;
}
- poll(pfd, m, timeout - now);
+ poll(pfd, m, (timeout - now) * 1000);
/* Receive any pending ICMP errors */
for (n = 0; n < m; n++) {
--
# James Antill -- james@and.org
:0:
* ^From: .*james@and.org
/dev/null
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-12-06 16:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-06 12:50 Traceroute without s bit Olaf Kirch
2000-12-06 13:09 ` Andi Kleen
2000-12-06 15:07 ` Olaf Kirch
2000-12-06 16:27 ` Andi Kleen
2000-12-06 15:35 ` James Antill [this message]
2000-12-06 16:29 ` Olaf Kirch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nnitoxh8b1.fsf@code.and.org \
--to=james@and.org \
--cc=linux-kernel@vger.kernel.org \
--cc=okir@caldera.de \
--cc=security-audit@ferret.lmh.ox.ac.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox