NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/45257: ping(8) prints bogus round-trip times after Year 2038



The following reply was made to PR bin/45257; it has been noted by GNATS.

From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/45257: ping(8) prints bogus round-trip times after Year 2038
Date: Sun, 11 Sep 2011 01:06:19 +0700

     Date:        Thu, 18 Aug 2011 19:50:04 +0000 (UTC)
     From:        David Laight <david%l8s.co.uk@localhost>
     Message-ID:  <20110818195004.56F0E63C0E2%www.NetBSD.org@localhost>
 
   |  Change diffsec() to do:
   |          return ((uint32_t)(timenow->tv_sec - then->tv_sec)*1.0
   |                    + (timenow->tv_usec - then->tv_usec)/1000000.0);
 
 Sorry, I know I'm a lot behind in my list reading, but what's this fetish
 with 32 bit time_t's in ping on a system which (necessarily for the reported
 problem) must have 64 bit time_t's ?
 
 Why not just change ping to send 64 bit times (seconds) (plus microseconds or 
 whatever is in the other 32 bits)?
 
 There's no standards issue, no compatibility issue, no reason at all that
 I can see (unless you really care about an extra 4 bytes of min packet size,
 which would usually make no difference to the IPv4 ping because of the
 padding it defaults to send).
 
 kre
 
 ps: Does this issue also apply to ping6 ?
 


Home | Main Index | Thread Index | Old Index