patch-2.1.23 linux/net/ethernet/eth.c

Next file: linux/net/ipv4/af_inet.c
Previous file: linux/net/core/sock.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.22/linux/net/ethernet/eth.c linux/net/ethernet/eth.c
@@ -300,15 +300,14 @@
 	hh->hh_uptodate = 1;
 }
 
+#ifndef CONFIG_IP_ROUTER
+
 /*
  *	Copy from an ethernet device memory space to an sk_buff while checksumming if IP
  */
  
 void eth_copy_and_sum(struct sk_buff *dest, unsigned char *src, int length, int base)
 {
-#ifdef CONFIG_IP_ROUTER
-	memcpy(dest->data,src,length);
-#else
 	struct ethhdr *eth;
 	struct iphdr *iph;
 	int ip_length;
@@ -337,5 +336,6 @@
 
 	dest->csum=csum_partial_copy(src+sizeof(struct iphdr)+ETH_HLEN,dest->data+sizeof(struct iphdr)+ETH_HLEN,length,base);
 	dest->ip_summed=1;
-#endif	
 }
+
+#endif /* !(CONFIG_IP_ROUTER) */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov