Date: Sat, 21 Sep 1996 15:57:10 -0600 (MDT) From: marcs@alive.ampr.ab.ca To: FreeBSD-gnats-submit@freebsd.org Subject: bin/1668: traceroute -q1 only goes one hop before exiting Message-ID: <199609212157.PAA27600@alive.ampr.ab.ca> Resent-Message-ID: <199609230850.BAA02736@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 1668 >Category: bin >Synopsis: traceroute -q1 only goes one hop before exiting >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 23 01:50:02 PDT 1996 >Last-Modified: >Originator: Marc Slemko >Organization: >Release: FreeBSD 2.1-STABLE i386 >Environment: traceroute from either 2.1.5 or -current; that code hasn't changed. >Description: When I do a 'traceroute -q 1 destination', traceroute always exits after the first hop. This is because of a comparison on line 641 of 1.11 of traceroute.c which is designed to have traceroute exit if the destination has been reached, or ICMP unreachable messages have come back for (nearly) each packet sent to the host. I'm thinking that perhaps the original intent of the line was to allow for one unreachable to be lost and still exit. >How-To-Repeat: 'traceroute -q 1 anyhost', where anyhost is any host you feel like that is more than one hop away from you. >Fix: The below patch fixes this problem, and shows where the problem is, but I'm not sure of all the possible conditions that the author is trying to deal with in the code, so the patch may well break something else. --- traceroute.c 1996/09/10 00:50:13 1.11 +++ traceroute.c 1996/09/21 21:51:13 @@ -638,7 +638,7 @@ (void) fflush(stdout); } putchar('\n'); - if (got_there || unreachable >= nprobes-1) + if (got_there || unreachable >= nprobes) exit(0); } exit(0); >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609212157.PAA27600>