mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-23 06:35:57 +00:00
Outgoing packets caused ARP requests even when the destination IP was already cached.
Matched documentation.
This commit is contained in:
parent
2074861b57
commit
bf74ffe974
|
@ -663,7 +663,7 @@ etharp_output(struct netif *netif, struct ip_addr *ipaddr, struct pbuf *q)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send an ARP request for the given IP address.
|
* Send an ARP request for the given IP address and/or queue a packet.
|
||||||
*
|
*
|
||||||
* If the IP address was not yet in the cache, a pending ARP cache entry
|
* If the IP address was not yet in the cache, a pending ARP cache entry
|
||||||
* is added and an ARP request is sent for the given address. The packet
|
* is added and an ARP request is sent for the given address. The packet
|
||||||
|
@ -672,8 +672,11 @@ etharp_output(struct netif *netif, struct ip_addr *ipaddr, struct pbuf *q)
|
||||||
* If the IP address was already pending in the cache, a new ARP request
|
* If the IP address was already pending in the cache, a new ARP request
|
||||||
* is sent for the given address. The packet is queued on this entry.
|
* is sent for the given address. The packet is queued on this entry.
|
||||||
*
|
*
|
||||||
* If the IP address was already stable in the cache, the packet is
|
* If the IP address was already stable in the cache, and a packet is
|
||||||
* directly sent. An ARP request is sent out.
|
* given, it is directly sent and no ARP request is sent out.
|
||||||
|
*
|
||||||
|
* If the IP address was already stable in the cache, and no packet is
|
||||||
|
* given, an ARP request is sent out.
|
||||||
*
|
*
|
||||||
* @param netif The lwIP network interface on which ipaddr
|
* @param netif The lwIP network interface on which ipaddr
|
||||||
* must be queried for.
|
* must be queried for.
|
||||||
|
@ -723,7 +726,7 @@ err_t etharp_query(struct netif *netif, struct ip_addr *ipaddr, struct pbuf *q)
|
||||||
(arp_table[i].state == ETHARP_STATE_STABLE)));
|
(arp_table[i].state == ETHARP_STATE_STABLE)));
|
||||||
|
|
||||||
/* do we have a pending entry? */
|
/* do we have a pending entry? */
|
||||||
if (arp_table[i].state == ETHARP_STATE_PENDING) {
|
if ((arp_table[i].state == ETHARP_STATE_PENDING) || (q == NULL)) {
|
||||||
/* try to resolve it; send out ARP request */
|
/* try to resolve it; send out ARP request */
|
||||||
result = etharp_request(netif, ipaddr);
|
result = etharp_request(netif, ipaddr);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user