mirror of
https://github.com/apache/nuttx.git
synced 2026-09-27 18:58:27 +08:00
net/arp: Improve arp_find() commit 9774d35010 to reduce the amount and frequency of data copies.
This commit is contained in:
@@ -159,10 +159,9 @@ static inline bool ipfwd_addrchk(FAR struct forward_s *fwd)
|
||||
{
|
||||
#if !defined(CONFIG_NET_ARP_IPIN) && !defined(CONFIG_NET_ARP_SEND)
|
||||
FAR struct ipv4_hdr_s *ipv4 = (FAR struct ipv4_hdr_s *)fwd->f_iob->io_data;
|
||||
struct arp_entry entry;
|
||||
int ret;
|
||||
|
||||
ret = arp_find(*(in_addr_t *)ipv4->destipaddr, &entry);
|
||||
ret = arp_find(*(in_addr_t *)ipv4->destipaddr, NULL);
|
||||
return (ret >= 0);
|
||||
#else
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user