Fix reversed test in connection with combining -i and -l. If some

packets have already sent because of the preload count handling, we
shouldn't start off by sending another one right away. The reversed
test causes ping6 to wait one interval before sending anything at all
if you don't use -l. PR bin/39732.
This commit is contained in:
dholland 2008-10-13 13:47:35 +00:00
parent f99598bbf5
commit 866d811ed8
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ping6.c,v 1.70 2006/09/23 16:18:04 elad Exp $ */
/* $NetBSD: ping6.c,v 1.71 2008/10/13 13:47:35 dholland Exp $ */
/* $KAME: ping6.c,v 1.164 2002/11/16 14:05:37 itojun Exp $ */
/*
@ -77,7 +77,7 @@ static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93";
#else
#include <sys/cdefs.h>
#ifndef lint
__RCSID("$NetBSD: ping6.c,v 1.70 2006/09/23 16:18:04 elad Exp $");
__RCSID("$NetBSD: ping6.c,v 1.71 2008/10/13 13:47:35 dholland Exp $");
#endif
#endif
@ -1008,7 +1008,7 @@ main(int argc, char *argv[])
itimer.it_interval = interval;
itimer.it_value = interval;
(void)setitimer(ITIMER_REAL, &itimer, NULL);
if (ntransmitted)
if (ntransmitted == 0)
retransmit();
}