diff options
Diffstat (limited to 'ntpd/refclock_palisade.c')
-rw-r--r-- | ntpd/refclock_palisade.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ntpd/refclock_palisade.c b/ntpd/refclock_palisade.c index 2b396d8..0520311 100644 --- a/ntpd/refclock_palisade.c +++ b/ntpd/refclock_palisade.c @@ -584,7 +584,10 @@ TSIP_decode ( break; } - if (up->leap_status & PALISADE_LEAP_PENDING) { + up->month = mb(15); + if ( (up->leap_status & PALISADE_LEAP_PENDING) && + /* Avoid early announce: https://bugs.ntp.org/2773 */ + (6 == up->month || 12 == up->month) ) { if (up->leap_status & PALISADE_UTC_TIME) pp->leap = LEAP_ADDSECOND; else @@ -615,6 +618,7 @@ TSIP_decode ( pp->hour = mb(11); pp->minute = mb(12); pp->second = mb(13); + up->month = mb(14); /* Save for LEAP check */ #ifdef DEBUG if (debug > 1) @@ -645,7 +649,9 @@ TSIP_decode ( printf("TSIP_decode: unit %d\n", up->unit); } #endif - if (getint((u_char *) &mb(10)) & 0x80) + if ( (getint((u_char *) &mb(10)) & 0x80) && + /* Avoid early announce: https://bugs.ntp.org/2773 */ + (6 == up->month || 12 == up->month) ) pp->leap = LEAP_ADDSECOND; /* we ASSUME addsecond */ else pp->leap = LEAP_NOWARNING; |