X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=net%2Fping.c;h=3e5461a36a02b2d1f41c857dc8d39aaabf440823;hb=HEAD;hp=9508cf1160ea048b03bc715c8b7599f5f71ceff7;hpb=bc0571fc1067ff8a8fd16990ae65c1a2826ea90c;p=u-boot diff --git a/net/ping.c b/net/ping.c index 9508cf1160..3e5461a36a 100644 --- a/net/ping.c +++ b/net/ping.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Copied from Linux Monitor (LiMon) - Networking. * @@ -6,7 +7,6 @@ * Copyright 2000 Roland Borde * Copyright 2000 Paolo Scaffardi * Copyright 2000-2002 Wolfgang Denk, wd@denx.de - * SPDX-License-Identifier: GPL-2.0 */ #include "ping.h" @@ -107,7 +107,8 @@ void ping_receive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len) icmph->type = ICMP_ECHO_REPLY; icmph->checksum = 0; icmph->checksum = compute_ip_checksum(icmph, len - IP_HDR_SIZE); - net_send_packet((uchar *)et, eth_hdr_size + len); + memcpy(net_tx_packet, et, eth_hdr_size + len); + net_send_packet(net_tx_packet, eth_hdr_size + len); return; /* default: return;*/