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

Next file: linux/scripts/Menuconfig
Previous file: linux/net/ipv4/arp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.80/linux/net/ipv4/tcp.c linux/net/ipv4/tcp.c
@@ -614,7 +614,7 @@
 			mask |= POLLIN | POLLRDNORM;
 
 #if 1 /* This needs benchmarking and real world tests */
-		space = sk->dst_cache->pmtu + 128;
+		space = (sk->dst_cache ? sk->dst_cache->pmtu : sk->mss) + 128;
 		if (space < 2048) /* XXX */
 			space = 2048;
 #else /* 2.0 way */
@@ -663,7 +663,7 @@
 			return put_user(amount, (int *)arg);
 		}
 		default:
-			return(-EINVAL);
+			return(-ENOIOCTLCMD);
 	};
 }
 

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