sntp: Don't set Leap Indicator in client messages.

Per RFC4330:
This field is significant only in server messages

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
This commit is contained in:
James Hilliard committed 2021-10-13 16:48:33 -06:00
1 parent b5147a149e
commit 37d45b3fbb
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -52,7 +52,7 @@ void mg_sntp_send(struct mg_connection *c, unsigned long utc) {
} else if (utc > s_sntmp_next) {
uint8_t buf[48] = {0};
s_sntmp_next = utc + SNTP_INTERVAL_SEC;
buf[0] = (3 << 6) | (4 << 3) | 3;
buf[0] = (0 << 6) | (4 << 3) | 3;
mg_send(c, buf, sizeof(buf));
LOG(LL_DEBUG,
("%p request sent, ct %lu, next at %lu", c->fd, utc, s_sntmp_next));