mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-15 10:29:47 +00:00
unbreak ARP
This commit is contained in:
1 parent
f4c35d1036
commit
1dff394b63
2 files changed
+3
-3
No files matched your search
+2
-2
@@ -5281,7 +5281,7 @@ static void mg_tcpip_rx(struct mg_tcpip_if *ifp, void *buf, size_t len) {
|
||||
mkpay(&pkt, pkt.eth + 1);
|
||||
if (pkt.eth->type == mg_htons(0x806)) {
|
||||
pkt.arp = (struct arp *) (pkt.pay.buf);
|
||||
if (sizeof(*pkt.eth) + sizeof(*pkt.arp) > pkt.pay.len) return; // Truncated
|
||||
if (pkt.pay.len < sizeof(*pkt.arp)) return; // Truncated
|
||||
mg_tcpip_call(ifp, MG_TCPIP_EV_ARP, &pkt.raw);
|
||||
rx_arp(ifp, &pkt);
|
||||
} else if (pkt.eth->type == mg_htons(0x86dd)) {
|
||||
@@ -22308,7 +22308,7 @@ struct mg_tcpip_driver mg_tcpip_driver_imxrt = {mg_tcpip_driver_imxrt_init,
|
||||
|
||||
bool __attribute__((weak)) netif_init(struct mg_tcpip_if *ifp) {
|
||||
(void) ifp;
|
||||
MG_ERROR(("Please link wifi/net/port/ contents"));
|
||||
MG_ERROR(("Please link wifi/port/net contents"));
|
||||
return false;
|
||||
}
|
||||
size_t __attribute__((weak))
|
||||
|
||||
+1
-1
@@ -1124,7 +1124,7 @@ static void mg_tcpip_rx(struct mg_tcpip_if *ifp, void *buf, size_t len) {
|
||||
mkpay(&pkt, pkt.eth + 1);
|
||||
if (pkt.eth->type == mg_htons(0x806)) {
|
||||
pkt.arp = (struct arp *) (pkt.pay.buf);
|
||||
if (sizeof(*pkt.eth) + sizeof(*pkt.arp) > pkt.pay.len) return; // Truncated
|
||||
if (pkt.pay.len < sizeof(*pkt.arp)) return; // Truncated
|
||||
mg_tcpip_call(ifp, MG_TCPIP_EV_ARP, &pkt.raw);
|
||||
rx_arp(ifp, &pkt);
|
||||
} else if (pkt.eth->type == mg_htons(0x86dd)) {
|
||||
|
||||
Reference in new issue
Block a user