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
This commit is contained in:
patacongo 2007-11-05 00:14:42 +00:00
parent 5fe0d01775
commit c48d0935a1

View File

@ -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);
}
/* Finish populating the ethernet header */
memcpy(ETHBUF->src, dev->d_mac.addr, IFHWADDRLEN);
ETHBUF->type = HTONS(UIP_ETHTYPE_IP);
dev->d_len += sizeof(struct uip_eth_hdr);
dev->d_len += UIP_LLH_LEN;
}