]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 3367] Faulty LinuxPPS NMEA clock support in 4.2.8
authorJuergen Perlinger <perlinger@ntp.org>
Mon, 21 Aug 2017 17:46:03 +0000 (19:46 +0200)
committerJuergen Perlinger <perlinger@ntp.org>
Mon, 21 Aug 2017 17:46:03 +0000 (19:46 +0200)
bk: 599b1c5bb8HguEUfH942cQJC1d3sag

ChangeLog
ntpd/ntp_refclock.c

index a1a1cfae45a59975bb12958d206f6c0a48e631b5..0f17a2dec4d3f648643d1c7dff312ad45a01c718 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+---
+* [Bug 3367] Faulty LinuxPPS NMEA clock support in 4.2.8 <perlinger@ntp.org>
+  - reverted handling of PPS kernel consumer to 4.2.6 behavior
+
 ---
 (4.2.8p10-win-beta1) 2017/03/21 Released by Harlan Stenn <stenn@ntp.org>
 (4.2.8p10)
index bc389012ef56436a4de52287c24b0290203d829f..94b35d43d6e879cb9f503df6035c32e581eb788a 100644 (file)
@@ -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);
 }