From e71110158124009c043eac704db9d442db43b36d Mon Sep 17 00:00:00 2001 From: Joe Hershberger Date: Wed, 23 May 2012 07:59:16 +0000 Subject: net: Add net_update_ether() to handle ARP and Ping replies When the network is VLAN or SNAP, net_update_ether() will preserve the original Ethernet packet header and simply replace the src and dest MACs and the protocol Signed-off-by: Joe Hershberger Acked-by: Simon Glass --- net/arp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/arp.c') diff --git a/net/arp.c b/net/arp.c index fcff53602f..8cc175a7d4 100644 --- a/net/arp.c +++ b/net/arp.c @@ -158,7 +158,7 @@ void ArpReceive(struct ethernet_hdr *et, struct ip_udp_hdr *ip, int len) /* reply with our IP address */ debug("Got ARP REQUEST, return our IP\n"); pkt = (uchar *)et; - eth_hdr_size = NetSetEther(pkt, et->et_src, PROT_ARP); + eth_hdr_size = net_update_ether(et, et->et_src, PROT_ARP); pkt += eth_hdr_size; arp->ar_op = htons(ARPOP_REPLY); memcpy(&arp->ar_tha, &arp->ar_sha, ARP_HLEN); -- cgit v1.2.3