mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-11 16:40:17 +00:00
SAME54 Ethernet driver
Add tls_builtin.c
This commit is contained in:
1 parent
66c2bfe822
commit
face6c44c6
20 files changed
+1606
-14
No files matched your search
+3
-2
@@ -762,6 +762,7 @@ static void mg_tcpip_rx(struct mg_tcpip_if *ifp, void *buf, size_t len) {
|
||||
pkt.raw.ptr = (char *) buf;
|
||||
pkt.raw.len = len;
|
||||
pkt.eth = (struct eth *) buf;
|
||||
//mg_hexdump(buf, len > 16 ? 16: len);
|
||||
if (pkt.raw.len < sizeof(*pkt.eth)) return; // Truncated - runt?
|
||||
if (ifp->enable_mac_check &&
|
||||
memcmp(pkt.eth->dst, ifp->mac, sizeof(pkt.eth->dst)) != 0 &&
|
||||
@@ -794,8 +795,8 @@ static void mg_tcpip_rx(struct mg_tcpip_if *ifp, void *buf, size_t len) {
|
||||
mkpay(&pkt, pkt.ip + 1);
|
||||
rx_ip(ifp, &pkt);
|
||||
} else {
|
||||
MG_DEBUG((" Unknown eth type %x", mg_htons(pkt.eth->type)));
|
||||
mg_hexdump(buf, len >= 16 ? 16 : len);
|
||||
MG_DEBUG(("Unknown eth type %x", mg_htons(pkt.eth->type)));
|
||||
mg_hexdump(buf, len >= 32 ? 32 : len);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user