lkml.org 
[lkml]   [2000]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: Traceroute without s bit
    From
    Date
    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/

    \
     
     \ /
      Last update: 2005-03-22 12:51    [W:0.063 / U:0.752 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site