fix PPP frame size, enforce L2 max lenghts

This commit is contained in:
Sergio R. Caprile committed 2026-09-07 11:14:58 -03:00
1 parent 86adf12a77
commit f87d439710
3 files changed
+12 -3

No files matched your search

+1
View File
@@ -135,6 +135,7 @@ bool mg_l2_eth_rx(struct mg_tcpip_if *ifp, enum mg_l2proto *proto,
}
pay->buf = ((char *) eth) + hdrlen;
pay->len = len - hdrlen;
if (len > ifp->framesize) return false; // Oversized
for (i = 0; i < sizeof(eth_types) / sizeof(uint16_t); i++) {
if (type == eth_types[i]) break;
}