Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/traceroute Only require half of the responses to in...



details:   https://anonhg.NetBSD.org/src/rev/ecc7699bf4f8
branches:  trunk
changeset: 473784:ecc7699bf4f8
user:      kim <kim%NetBSD.org@localhost>
date:      Sat Jun 19 05:07:44 1999 +0000

description:
Only require half of the responses to indicate that the destination is
unreachable.  This makes traceroute exit when it encounters a Cisco, which
typically does not respond to every other probe (or so) when either there
is no route to the destionation or an access list is blocking the probes.

diffstat:

 usr.sbin/traceroute/traceroute.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r a8080a0ec707 -r ecc7699bf4f8 usr.sbin/traceroute/traceroute.c
--- a/usr.sbin/traceroute/traceroute.c  Sat Jun 19 04:51:42 1999 +0000
+++ b/usr.sbin/traceroute/traceroute.c  Sat Jun 19 05:07:44 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: traceroute.c,v 1.35 1999/06/16 20:43:48 is Exp $       */
+/*     $NetBSD: traceroute.c,v 1.36 1999/06/19 05:07:44 kim Exp $      */
 
 /*
  * Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997
@@ -29,7 +29,7 @@
 #else
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997\n\
 The Regents of the University of California.  All rights reserved.\n");
-__RCSID("$NetBSD: traceroute.c,v 1.35 1999/06/16 20:43:48 is Exp $");
+__RCSID("$NetBSD: traceroute.c,v 1.36 1999/06/19 05:07:44 kim Exp $");
 #endif
 #endif
 
@@ -916,7 +916,7 @@
                }
                putchar('\n');
                if (got_there ||
-                   (unreachable > 0 && unreachable >= nprobes))
+                   (unreachable > 0 && unreachable >= ((nprobes + 1) / 2)))
                        break;
        }
        exit(0);



Home | Main Index | Thread Index | Old Index