mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-09 16:21:45 +00:00
fix PPP frame size, enforce L2 max lenghts
This commit is contained in:
1 parent
86adf12a77
commit
f87d439710
3 files changed
+12
-3
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user