diff options
author | hrs <hrs@FreeBSD.org> | 2014-10-09 23:48:20 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2014-10-09 23:48:20 +0000 |
commit | c1d2c479c7805e938cfe55e0f60b72e02c14c4d8 (patch) | |
tree | 5e800b3adb7323215541890ab386ad0b233ca51e /sbin/ping6 | |
parent | 159d6219dbd3d475be768331b2ac2bf336a2d3e7 (diff) | |
download | FreeBSD-src-c1d2c479c7805e938cfe55e0f60b72e02c14c4d8.zip FreeBSD-src-c1d2c479c7805e938cfe55e0f60b72e02c14c4d8.tar.gz |
MFC r271909:
Revert changes in r269180. It could cause -c N option to enter an
infinite loop if no reply packet is received.
Diffstat (limited to 'sbin/ping6')
-rw-r--r-- | sbin/ping6/ping6.c | 10 |
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; |