summaryrefslogtreecommitdiffstats
path: root/freebsd/sbin/ping6/ping6.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/sbin/ping6/ping6.c')
-rw-r--r--freebsd/sbin/ping6/ping6.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/freebsd/sbin/ping6/ping6.c b/freebsd/sbin/ping6/ping6.c
index 9553890c..2067b54b 100644
--- a/freebsd/sbin/ping6/ping6.c
+++ b/freebsd/sbin/ping6/ping6.c
@@ -1165,8 +1165,14 @@ main(int argc, char *argv[])
/* signal handling */
if (seenalrm) {
/* last packet sent, timeout reached? */
- if (npackets && ntransmitted >= npackets)
- break;
+ if (npackets && ntransmitted >= npackets) {
+ struct timeval zerotime = {0, 0};
+ itimer.it_value = zerotime;
+ itimer.it_interval = zerotime;
+ (void)setitimer(ITIMER_REAL, &itimer, NULL);
+ seenalrm = 0; /* clear flag */
+ continue;
+ }
retransmit();
seenalrm = 0;
continue;