summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/arp.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/arp.c b/net/arp.c
index b8a71684cd..ea685d9ac6 100644
--- a/net/arp.c
+++ b/net/arp.c
@@ -100,7 +100,7 @@ int arp_timeout_check(void)
{
ulong t;
- if (!net_arp_wait_packet_ip.s_addr)
+ if (!arp_is_waiting())
return 0;
t = get_timer(0);
@@ -187,8 +187,8 @@ void arp_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len)
return;
case ARPOP_REPLY: /* arp reply */
- /* are we waiting for a reply */
- if (!net_arp_wait_packet_ip.s_addr)
+ /* are we waiting for a reply? */
+ if (!arp_is_waiting())
break;
#ifdef CONFIG_KEEP_SERVERADDR
@@ -233,3 +233,8 @@ void arp_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len)
return;
}
}
+
+bool arp_is_waiting(void)
+{
+ return !!net_arp_wait_packet_ip.s_addr;
+}