summaryrefslogtreecommitdiff
path: root/net/ping.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ping.c')
-rw-r--r--net/ping.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/net/ping.c b/net/ping.c
index 71246de5ff..068aa96a74 100644
--- a/net/ping.c
+++ b/net/ping.c
@@ -40,22 +40,18 @@ static void set_icmp_header(uchar *pkt, IPaddr_t dest)
static int ping_send(void)
{
- static uchar mac[6];
uchar *pkt;
int eth_hdr_size;
/* XXX always send arp request */
- memcpy(mac, NetEtherNullAddr, 6);
-
debug("sending ARP for %pI4\n", &NetPingIP);
NetArpWaitPacketIP = NetPingIP;
- NetArpWaitPacketMAC = mac;
- pkt = NetArpWaitTxPacket;
- eth_hdr_size = NetSetEther(pkt, mac, PROT_IP);
- pkt += eth_hdr_size;
+ eth_hdr_size = NetSetEther(NetArpWaitTxPacket, NetEtherNullAddr,
+ PROT_IP);
+ pkt = NetArpWaitTxPacket + eth_hdr_size;
set_icmp_header(pkt, NetPingIP);