patch-2.1.79 linux/net/ipv4/tcp.c

Next file: linux/net/ipv4/tcp_input.c
Previous file: linux/net/ipv4/sysctl_net_ipv4.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.78/linux/net/ipv4/tcp.c linux/net/ipv4/tcp.c
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp.c,v 1.75 1997/10/16 02:57:34 davem Exp $
+ * Version:	$Id: tcp.c,v 1.76 1997/12/30 19:43:17 kuznet Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -659,7 +659,7 @@
 			return put_user(amount, (int *)arg);
 		}
 		default:
-			return(-EINVAL);
+			return(-ENOIOCTLCMD);
 	};
 }
 
@@ -814,7 +814,7 @@
 			struct sk_buff *skb;
 
 			if (err)
-				return (err);
+				return -EFAULT;
 
 			/* Stop on errors. */
 			if (sk->err) {
@@ -950,7 +950,7 @@
 				skb->h.th->urg_ptr = ntohs(copy);
 			}
 
-			skb->csum = csum_partial_copy_from_user(from,
+			skb->csum = csum_and_copy_from_user(from,
 					skb_put(skb, copy), copy, 0, &err);
 
 			from += copy;
@@ -968,7 +968,7 @@
 	sk->err = 0;
 
 	if (err)
-		return (err);
+		return -EFAULT;
 
 	return copied;
 }

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