Date: Sun, 19 Apr 2015 18:00:53 -0700 From: Anmol Khirbat <khirbat@gmail.com> To: Wolfgang Zenker <wolfgang@lyxys.ka.sub.org> Cc: freebsd-mips@freebsd.org Subject: Re: Edge Router Lite: ntpd/ntpdate switch to 2050 Message-ID: <m24mob1um2.fsf@gmail.com> In-Reply-To: <20150413130309.GA82425@lyxys.ka.sub.org> (Wolfgang Zenker's message of "Mon, 13 Apr 2015 15:03:09 %2B0200") References: <20150413130309.GA82425@lyxys.ka.sub.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Wolfgang Zenker <wolfgang@lyxys.ka.sub.org> writes: > Hi, > > not sure if this is platform related or a generic problem: After the > recent ntpd update my Edge Router Lite running current has the problem > that ntpd and ntpdate set the date/time to somewhere in 2050, but only > if the offset of the system clock is larger than about 0.5 seconds. > > Currently running: > FreeBSD pomona 11.0-CURRENT FreeBSD 11.0-CURRENT #0: Mon Apr 13 03:48:04 CEST 2015 wolfgang@pomona:/usr/obj/usr/src/sys/UBQTERL mips > > Problem happened with a few earlier versions after the new ntpd as well. > I think this is a problem on all big-endian systems. I tried mips, mips64 and powerpc64 using Qemu. root@:~ # uname -a FreeBSD 11.0-CURRENT FreeBSD 11.0-CURRENT #0 9cb51c3(master): Sun Apr 19 21:37:44 UTC 2015 anmol@fbsd8:/usr/home/anmol/obj/mips.mips64/usr/home/anmol/freebsd/sys/MALTA64 mips root@:~ # date Mon Apr 20 00:17:01 UTC 2015 root@:~ # /usr/sbin/ntpdate -v time.apple.com 20 Apr 00:17:07 ntpdate[678]: ntpdate 4.2.8p1-a (1) 6 Aug 08:04:48 ntpdate[678]: step time server 17.253.16.243 offset 205.523809 sec root@:~ # date Sat Aug 6 08:04:51 UTC 2050 # <<<<<===== Looks like usr.sbin/ntp/config.h is wrong. This seems to fix ntpdate. I am not sure what a general fix for all possible architectures would look like. diff --git a/usr.sbin/ntp/config.h b/usr.sbin/ntp/config.h index b771834..a6ed749 100644 --- a/usr.sbin/ntp/config.h +++ b/usr.sbin/ntp/config.h @@ -1586,7 +1586,7 @@ typedef unsigned int uintptr_t; # endif #else # ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ +# define WORDS_BIGENDIAN 1 # endif #endif Regards, Anmol
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m24mob1um2.fsf>