sntp: Fix client receive KOD packet that make pool MEMP_SYS_TIMEOUT not be freed

This commit is contained in:
yuanjm
2021-06-21 14:37:21 +08:00
parent 67deb8055a
commit 1c1642fe45

View File

@ -525,6 +525,7 @@ sntp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr,
/* KOD errors are only processed in case of an explicit poll response */
if (sntp_opmode == SNTP_OPMODE_POLL) {
/* Kiss-of-death packet. Use another server or increase UPDATE_DELAY. */
sys_untimeout(sntp_request, NULL);
sntp_try_next_server(NULL);
}
} else {