From: florian Date: Fri, 18 Apr 2014 16:07:54 +0000 (+0000) Subject: Sync to tracroute: handle "time exceeded in transit" before the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4402966adea4beaf793d7c0ba12e444f710b9bf8;p=openbsd Sync to tracroute: handle "time exceeded in transit" before the switch and add a default case. OK benno@ --- diff --git a/usr.sbin/traceroute6/traceroute6.c b/usr.sbin/traceroute6/traceroute6.c index 3ba5c14d3ad..83e690aca0a 100644 --- a/usr.sbin/traceroute6/traceroute6.c +++ b/usr.sbin/traceroute6/traceroute6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: traceroute6.c,v 1.72 2014/04/18 16:02:08 florian Exp $ */ +/* $OpenBSD: traceroute6.c,v 1.73 2014/04/18 16:07:54 florian Exp $ */ /* $KAME: traceroute6.c,v 1.63 2002/10/24 12:53:25 itojun Exp $ */ /* @@ -734,6 +734,10 @@ main(int argc, char *argv[]) printf(" %g ms", deltaT(&t1, &t2)); if (ttl_flag) printf(" (%u)", rcvhlim); + + /* time exceeded in transit */ + if (i == -1) + break; switch (i - 1) { case ICMP6_DST_UNREACH_NOROUTE: ++unreachable; @@ -757,6 +761,10 @@ main(int argc, char *argv[]) printf(" !"); ++got_there; break; + default: + ++unreachable; + printf(" !<%d>", i - 1); + break; } break; }