From 4ad31ee437288a03225415c76065033c1490bf77 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 19 Aug 2009 16:17:11 +0200 Subject: [PATCH] do not abuse the received packet to send back another packet Signed-off-by: Sascha Hauer --- net/net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c index 65ecdb392..db6d57599 100644 --- a/net/net.c +++ b/net/net.c @@ -566,7 +566,8 @@ NetReceive(uchar * inpkt, int len) NetCopyIP(&arp->ar_data[16], &arp->ar_data[6]); memcpy (&arp->ar_data[ 0], NetOurEther, 6); NetCopyIP(&arp->ar_data[ 6], &NetOurIP); - (void) eth_send((uchar *)et, (pkt - (uchar *)et) + ARP_HDR_SIZE); + memcpy(NetTxPacket, et, (pkt - (uchar *)et) + ARP_HDR_SIZE); + eth_send((uchar *)NetTxPacket, (pkt - (uchar *)et) + ARP_HDR_SIZE); return; case ARPOP_REPLY: /* arp reply */