Index: traceroute.c =================================================================== RCS file: /Volumes/src/cvs/od/src/network_cmds/traceroute.tproj/traceroute.c,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 traceroute.c --- traceroute.c 13 Dec 2003 16:15:54 -0000 1.1.1.2 +++ traceroute.c 21 Aug 2004 12:37:54 -0000 @@ -512,8 +512,7 @@ for (ttl = 1; ttl <= max_ttl; ++ttl) { u_long lastaddr = 0; - int got_there = 0; - int unreachable = 0; + int got_there = 0, unreachable = 0, timeout = 0; Printf("%2d ", ttl); for (probe = 0; probe < nprobes; ++probe) { @@ -567,10 +566,11 @@ } if (cc == 0) Printf(" *"); + timeout++; (void) fflush(stdout); } putchar('\n'); - if (got_there || unreachable >= nprobes-1) + if (got_there || (unreachable && (unreachable + timeout) >= nprobes)) exit(0); } }