Skip to content
Snippets Groups Projects
Commit c48d0935 authored by patacongo's avatar patacongo
Browse files

Fix problem with ARP request message length

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@369 42af7a65-404d-4744-a932-0658087f49c3
parent 5fe0d017
No related branches found
No related tags found
No related merge requests found
......@@ -487,7 +487,7 @@ void uip_arp_out(struct uip_driver_s *dev)
ETHBUF->type = HTONS(UIP_ETHTYPE_ARP);
dev->d_appdata = &dev->d_buf[UIP_TCPIP_HLEN + UIP_LLH_LEN];
dev->d_len = sizeof(struct arp_hdr);
dev->d_len = sizeof(struct arp_hdr) + UIP_LLH_LEN;
return;
}
......@@ -495,9 +495,10 @@ void uip_arp_out(struct uip_driver_s *dev)
memcpy(ETHBUF->dest, tabptr->at_ethaddr.addr, IFHWADDRLEN);
}
memcpy(ETHBUF->src, dev->d_mac.addr, IFHWADDRLEN);
ETHBUF->type = HTONS(UIP_ETHTYPE_IP);
/* Finish populating the ethernet header */
dev->d_len += sizeof(struct uip_eth_hdr);
memcpy(ETHBUF->src, dev->d_mac.addr, IFHWADDRLEN);
ETHBUF->type = HTONS(UIP_ETHTYPE_IP);
dev->d_len += UIP_LLH_LEN;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment