patch-1.3.9 linux/net/ethernet/eth.c
Next file: linux/net/ipv4/Makefile
Previous file: linux/net/ethernet/Makefile
Back to the patch index
Back to the overall index
-  Lines: 15
 -  Date:
Mon Jul 10 17:08:04 1995
 -  Orig file: 
v1.3.8/linux/net/ethernet/eth.c
 -  Orig date: 
Fri Jul  7 08:54:57 1995
 
diff -u --recursive --new-file v1.3.8/linux/net/ethernet/eth.c linux/net/ethernet/eth.c
@@ -233,9 +233,12 @@
  *	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)
+void eth_copy_and_sum(struct sk_buff *dest, unsigned char *src, int length, int base)
 {
-	struct ethhdr *eth=(struct ethhdr *)dest->data;
+	struct ethhdr *eth;
+
+	IS_SKB(dest);
+	eth=(struct ethhdr *)dest->data;
 	memcpy(dest->data,src,34);	/* ethernet is always >= 60 */
 	length-=34;
 	if(eth->h_proto!=htons(ETH_P_IP))
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this