patch-2.1.68 linux/net/ipv6/udp.c

Next file: linux/net/ipx/af_ipx.c
Previous file: linux/net/ipv6/tcp_ipv6.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.67/linux/net/ipv6/udp.c linux/net/ipv6/udp.c
@@ -7,7 +7,7 @@
  *
  *	Based on linux/ipv4/udp.c
  *
- *	$Id: udp.c,v 1.17 1997/04/29 09:38:55 mj Exp $
+ *	$Id: udp.c,v 1.18 1997/09/14 08:32:24 davem Exp $
  *
  *	This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
@@ -601,8 +601,9 @@
 		clen -= sizeof(struct udphdr);
 	}
 
-	udh->wcheck = csum_partial_copy_fromiovecend(dst, udh->iov, offset,
-						     clen, udh->wcheck);
+	if (csum_partial_copy_fromiovecend(dst, udh->iov, offset,
+						     clen, &udh->wcheck))
+		return -EFAULT;
 
 	if (final) {
 		struct in6_addr *daddr;

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