From: Juergen Perlinger Date: Mon, 21 Aug 2017 17:46:03 +0000 (+0200) Subject: [Bug 3367] Faulty LinuxPPS NMEA clock support in 4.2.8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56043ff50d1fd7657aa16793e22b9372669caee8;p=thirdparty%2Fntp.git [Bug 3367] Faulty LinuxPPS NMEA clock support in 4.2.8 bk: 599b1c5bb8HguEUfH942cQJC1d3sag --- diff --git a/ChangeLog b/ChangeLog index a1a1cfae4..0f17a2dec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +--- +* [Bug 3367] Faulty LinuxPPS NMEA clock support in 4.2.8 + - reverted handling of PPS kernel consumer to 4.2.6 behavior + --- (4.2.8p10-win-beta1) 2017/03/21 Released by Harlan Stenn (4.2.8p10) diff --git a/ntpd/ntp_refclock.c b/ntpd/ntp_refclock.c index bc389012e..94b35d43d 100644 --- a/ntpd/ntp_refclock.c +++ b/ntpd/ntp_refclock.c @@ -1247,16 +1247,24 @@ refclock_params( /* * If flag3 is lit, select the kernel PPS if we can. + * + * Note: EOPNOTSUPP is the only 'legal' error code we deal with; + * it is part of the 'if we can' strategy. Any other error + * indicates something more sinister and makes this function fail. */ if (mode & CLK_FLAG3) { if (time_pps_kcbind(ap->handle, PPS_KC_HARDPPS, ap->pps_params.mode & ~PPS_TSFMT_TSPEC, - PPS_TSFMT_TSPEC) < 0) { - msyslog(LOG_ERR, - "refclock_params: time_pps_kcbind: %m"); - return (0); + PPS_TSFMT_TSPEC) < 0) + { + if (errno != EOPNOTSUPP) { + msyslog(LOG_ERR, + "refclock_params: time_pps_kcbind: %m"); + return (0); + } + } else { + hardpps_enable = 1; } - hardpps_enable = 1; } return (1); }