local: check offset sanity before accumulation

Don't accept an offset that points to time before 1970 or outside the
interval to which is mapped NTP time.
This commit is contained in:
Miroslav Lichvar
2015-04-07 14:58:58 +02:00
parent 183a648d01
commit aec97397e8
8 changed files with 77 additions and 13 deletions

View File

@@ -1555,8 +1555,11 @@ handle_manual_delete(CMD_Request *rx_message, CMD_Reply *tx_message)
static void
handle_make_step(CMD_Request *rx_message, CMD_Reply *tx_message)
{
LCL_MakeStep();
tx_message->status = htons(STT_SUCCESS);
if (!LCL_MakeStep()) {
tx_message->status = htons(STT_FAILED);
} else {
tx_message->status = htons(STT_SUCCESS);
}
}
/* ================================================== */