patch-1.3.62 linux/net/core/sock.c

Next file: linux/net/ipv4/Makefile
Previous file: linux/kernel/sched.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.61/linux/net/core/sock.c linux/net/core/sock.c
@@ -169,19 +169,19 @@
 			sk->broadcast=valbool;
 			return 0;
 		case SO_SNDBUF:
-			if(val>32767)
-				val=32767;
-			if(val<256)
-				val=256;
-			sk->sndbuf=val;
+			if(val > SK_WMEM_MAX*2)
+				val = SK_WMEM_MAX*2;
+			if(val < 256)
+				val = 256;
+			sk->sndbuf = val;
 			return 0;
 
 		case SO_RCVBUF:
-			if(val>32767)
-				val=32767;
-			if(val<256)
-				val=256;
-			sk->rcvbuf=val;
+			if(val > SK_RMEM_MAX*2)
+			 	val = SK_RMEM_MAX*2;
+			if(val < 256)
+				val = 256;
+			sk->rcvbuf = val;
 			return(0);
 
 		case SO_KEEPALIVE:

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