summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2014-09-20 18:48:50 +0000
committerhrs <hrs@FreeBSD.org>2014-09-20 18:48:50 +0000
commit44e120581bb41cd1af0e55ad630b69e1385343f9 (patch)
treede002f2771ff4adcb16bfab535e1bc6366130af0 /sbin
parenta34aa18195a77cad15c2408a51b63e07ce819451 (diff)
downloadFreeBSD-src-44e120581bb41cd1af0e55ad630b69e1385343f9.zip
FreeBSD-src-44e120581bb41cd1af0e55ad630b69e1385343f9.tar.gz
Revert changes in r269180. It could cause -c N option to enter an
infinite loop if no reply packet is received. PR: 151023
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ping6/ping6.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c
index b963de1..01e29a1 100644
--- a/sbin/ping6/ping6.c
+++ b/sbin/ping6/ping6.c
@@ -1090,14 +1090,8 @@ main(int argc, char *argv[])
/* signal handling */
if (seenalrm) {
/* last packet sent, timeout reached? */
- 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;
- }
+ if (npackets && ntransmitted >= npackets)
+ break;
retransmit();
seenalrm = 0;
continue;
OpenPOWER on IntegriCloud