Compare commits

...

4 Commits

Author SHA1 Message Date
likewise
30fde02666 Mentioned another ARP fix and named this 0.7.1 for release. 2004-02-05 19:15:24 +00:00
likewise
100eaa9855 Removed updating ARP cache using destination address (which is wrong for requests and replies are unicast anyway). 2004-02-05 19:13:33 +00:00
likewise
3d287a950f Mention ARP fix. 2004-02-05 18:31:57 +00:00
likewise
3aa6a385da Was updating ARP cache from a re-cycled ARP reply pbuf in some cases. Fixed.
Reported on lwip-users by Stephen Chen on february 4th 2004.
2004-02-05 18:29:08 +00:00
2 changed files with 21 additions and 12 deletions

View File

@@ -7,6 +7,16 @@ TODO
HISTORY
(active STABLE-0_7 branch)
(STABLE-0_7_1)
++ Bug fixes:
* Fixed updating the ARP cache from a request pbuf that was recycled earlier for reply.
* Removed updating ARP cache using destination address (which is wrong for requests and
does not work for replies as those are unicast anyway).
(STABLE-0_7_0)
++ Bug fixes:

View File

@@ -521,6 +521,17 @@ etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p)
for_us = ip_addr_cmp(&(hdr->dipaddr), &(netif->ip_addr));
}
/* add or update entries in the ARP cache */
if (for_us) {
/* insert IP address in ARP cache (assume requester wants to talk to us)
* we might even send out a queued packet to this host */
update_arp_entry(netif, &(hdr->sipaddr), &(hdr->shwaddr), ARP_INSERT_FLAG);
/* request was not directed to us, but snoop anyway */
} else {
/* update the source IP address in the cache */
update_arp_entry(netif, &(hdr->sipaddr), &(hdr->shwaddr), 0);
}
switch (htons(hdr->opcode)) {
/* ARP request? */
case ARP_REQUEST:
@@ -579,18 +590,6 @@ etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p)
LWIP_DEBUGF(ETHARP_DEBUG | DBG_TRACE, ("etharp_arp_input: ARP unknown opcode type %d\n", htons(hdr->opcode)));
break;
}
/* add or update entries in the ARP cache */
if (for_us) {
/* insert IP address in ARP cache (assume requester wants to talk to us)
* we might even send out a queued packet to this host */
update_arp_entry(netif, &(hdr->sipaddr), &(hdr->shwaddr), ARP_INSERT_FLAG);
/* request was not directed to us, but snoop anyway */
} else {
/* update or insert the source IP address in the cache */
update_arp_entry(netif, &(hdr->sipaddr), &(hdr->shwaddr), 0);
/* update or insert the destination IP address pair in the cache */
update_arp_entry(netif, &(hdr->dipaddr), &(hdr->dhwaddr), 0);
}
/* free ARP packet */
pbuf_free(p);
p = NULL;