]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[bug 2143] do not process data if quality indication says 'not good' to avoid glitches
authorJuergen Perlinger <perlinger@ntp.org>
Sun, 19 Feb 2012 08:29:05 +0000 (09:29 +0100)
committerJuergen Perlinger <perlinger@ntp.org>
Sun, 19 Feb 2012 08:29:05 +0000 (09:29 +0100)
bk: 4f40b2d1RDhgJQlwsOXUV_DPR-7ySA

ntpd/refclock_nmea.c

index 51c87501352cb42056d33a7f2fe7f5f3ac18b021..af8c68c4f578399e7e3e874de31b7135ef5ba2b8 100644 (file)
@@ -917,7 +917,12 @@ nmea_receive(
                refclock_report(peer, CEVNT_BADDATE);
                return;
        }
-       
+       /* check clock sanity; [bug 2143] */
+       if (pp->leap == LEAP_NOTINSYNC) {       /* no good status? */
+               refclock_report(peer, CEVNT_BADREPLY);
+               return;
+       }
+
        DPRINTF(1, ("%s effective timecode: %04u-%02u-%02u %02d:%02d:%02d\n",
                refnumtoa(&peer->srcadr),
                date.year, date.month, date.monthday,