mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
During a positive leap second, the tai_time offset should be
incremented at the start of the leap second, not after the leap second has been inserted. This is because at the start of the leap second, we set the time back one second. This setting back one second is the moment that the offset changes. The old code set it back after the leap second, but that's one second too late. The negative leap second case is handled correctly. Reviewed by: phk
This commit is contained in:
parent
d88797c2ba
commit
eac3c62b51
1 changed files with 1 additions and 1 deletions
|
|
@ -480,6 +480,7 @@ ntp_update_second(int64_t *adjustment, time_t *newsec)
|
|||
else if ((*newsec) % 86400 == 0) {
|
||||
(*newsec)--;
|
||||
time_state = TIME_OOP;
|
||||
time_tai++;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -500,7 +501,6 @@ ntp_update_second(int64_t *adjustment, time_t *newsec)
|
|||
* Insert second in progress.
|
||||
*/
|
||||
case TIME_OOP:
|
||||
time_tai++;
|
||||
time_state = TIME_WAIT;
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue