diff options
Diffstat (limited to 'app/ntp.c')
-rw-r--r-- | app/ntp.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -78,6 +78,11 @@ static void ntp_rx (void *arg, struct udp_pcb *s, struct pbuf *p, struct ip_addr if (p->len < sizeof (ntp_packet_t)) break; + if (!pll_valid) break; + + if (!time_known) break; + + memcpy (&pkt, p->payload, sizeof (ntp_packet_t)); pbuf_realloc (p, sizeof (ntp_packet_t)); |