fix wrong length returned from l2_eth_rx

This commit is contained in:
Sergio R. Caprile committed 2025-12-19 14:11:13 -03:00
1 parent 16d8e3b4f9
commit 2bfcfeb359
4 files changed
+53 -39

No files matched your search

+1 -1
View File
@@ -87,7 +87,7 @@ bool mg_l2_eth_rx(struct mg_tcpip_if *ifp, enum mg_l2proto *proto,
return false;
}
pay->buf = (char *) (eth + 1);
pay->len = len;
pay->len = len - sizeof(*eth);
type = mg_htons(eth->type);
for (i = 0; i < sizeof(eth_types) / sizeof(uint16_t); i++) {