bugGPSD - Bugs: bug #51771, gpsd will nt pass time to NTP from...

 
 

bug #51771: gpsd will nt pass time to NTP from a pty

Submitter:  Gary E. Miller <garyemiller>
Submitted:  Wed 16 Aug 2017 11:41:12 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Wont Fix
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 26 Dec 2018 02:38:19 PM UTC, comment #1: 

Marking this Wonfix and closing.  Running our regression tests should never screw with system time; I'm not going to add any configuration switches or logic that could even possibly let this happen.

Eric S. Raymond <esr>
Group administrator
Wed 16 Aug 2017 11:41:12 PM UTC, original submission:  

A user has gpsd connecting to a local pty to get GPS data.  The same way gpsfake does.  When gpsd detects it is reading from a pty it will not pass time to NTP.  This breaks the customers setup.

Here is the code, and his patch:

```

diff --git a/timehint.c b/timehint.c
index c33a3d36..56578c96 100644
--- a/timehint.c
+++ b/timehint.c
@@ -431,8 +431,8 @@ void ntpshm_link_activate(struct gps_device_t *session)
 /* set up ntpshm storage for a session */
 {
     /* don't talk to NTP when we're running inside the test harness */
-    if (session->sourcetype == source_pty)
-   return;
+//    if (session->sourcetype == source_pty)
+// return;

     if (session->sourcetype != source_pps ) {
    /* allocate a shared-memory segment for "NMEA" time data */

```

Not a good solution as when the user runs gpsfake it will send bad time to NTP.  gpsd needs a better way to detect input from gpsfake, or maybe a flag to gpsd so NTP can be disabled manually.

Gary E. Miller <garyemiller>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by esr (Posted a comment)
  • -email is unavailable- added by garyemiller (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-12-26 esr StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code