Date: Mon, 15 Sep 2014 20:11:27 +0200 From: John Hay <jhay@meraka.org.za> To: Xin LI <delphij@FreeBSD.org> Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r269800 - stable/10/sbin/ping6 Message-ID: <20140915181126.GA22013@zibbi.meraka.csir.co.za> In-Reply-To: <53e8688f.2851.32479e23@svn.freebsd.org> References: <53e8688f.2851.32479e23@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Xin, I have just upgraded one of my boxes to 10-stable and found one of my scripts just hangs. I traced it to this change in ping6. If you do "ping6 -c 3 <machine_that_is_now_dead>", ping6 will hang until you ^C it. Regards John On Mon, Aug 11, 2014 at 06:54:07AM +0000, Xin LI wrote: > Author: delphij > Date: Mon Aug 11 06:54:07 2014 > New Revision: 269800 > URL: http://svnweb.freebsd.org/changeset/base/269800 > > Log: > MFC r269180: > > When interval is set to very small value with limited amount of packets, > ping6(8) would quit before the remote side gets a chance to respond. > > Solve this by resetting the itimer when we have reached the maximum packet > number have reached, but let the other handling to continue. > > PR: bin/151023 > Submitted by: tjmao at tjmao.net > > Modified: > stable/10/sbin/ping6/ping6.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sbin/ping6/ping6.c > ============================================================================== > --- stable/10/sbin/ping6/ping6.c Mon Aug 11 03:04:16 2014 (r269799) > +++ stable/10/sbin/ping6/ping6.c Mon Aug 11 06:54:07 2014 (r269800) > @@ -1090,8 +1090,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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140915181126.GA22013>