patch-2.1.14 linux/net/ipv6/raw.c

Next file: linux/net/netrom/nr_in.c
Previous file: linux/net/ipv6/ndisc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.13/linux/net/ipv6/raw.c linux/net/ipv6/raw.c
@@ -386,6 +386,9 @@
 				return -EOPNOTSUPP;
 			return rawv6_seticmpfilter(sk, level, optname, optval,
 						   optlen);
+		case SOL_IPV6:
+			if (optname == IPV6_CHECKSUM)
+				break;
 		default:
 			return ipv6_setsockopt(sk, level, optname, optval,
 					       optlen);
@@ -398,11 +401,18 @@
   	if(err)
   		return err;
 
-	switch (optname) 
+	switch (optname)
 	{
-		case RAW_CHECKSUM:
-			opt->checksum = 1;
-			opt->offset = val;
+		case IPV6_CHECKSUM:
+			if (val < 0)
+			{
+				opt->checksum = 0;
+			}
+			else
+			{
+				opt->checksum = 1;
+				opt->offset = val;
+			}
 
 			return 0;
 			break;

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