forked from Imagelibrary/lwip
Compare commits
4 Commits
master
...
STABLE-0_7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30fde02666 | ||
|
|
100eaa9855 | ||
|
|
3d287a950f | ||
|
|
3aa6a385da |
10
CHANGELOG
10
CHANGELOG
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user