diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-16 20:19:29 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-16 20:19:29 +0000 |
commit | 60c325372de33908aff95d74393cc4a025d99c38 (patch) | |
tree | 4ca47b44a608d7a10992293bfa3cac5493aa1589 /usr.sbin/traceroute | |
parent | f59014986f836f5d6492885cd0b50671c96f0cf9 (diff) |
if time expired, cc = 0 & break to *; Havard.Eidnes@runit.sintef.no
Diffstat (limited to 'usr.sbin/traceroute')
-rw-r--r-- | usr.sbin/traceroute/traceroute.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/traceroute/traceroute.c b/usr.sbin/traceroute/traceroute.c index 2ebd12c2c93..80bfb6f775a 100644 --- a/usr.sbin/traceroute/traceroute.c +++ b/usr.sbin/traceroute/traceroute.c @@ -493,6 +493,10 @@ main(argc, argv) send_probe(++seq, ttl, &to); while (cc = wait_for_reply(s, &from, &t1)) { (void) gettimeofday(&t2, &tz); + if (t2.tv_sec - t1.tv_sec > waittime) { + cc = 0; + break; + } if ((i = packet_ok(packet, cc, &from, seq))) { if (from.sin_addr.s_addr != lastaddr) { print(packet, cc, &from); |