lkml.org 
[lkml]   [1996]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectLooks like SO_RCVBUF should be limited to 65535.
On linux 2.0.0, running samba with SO_RCVBUF=65536 was causing
failures. Setting SO_RCVBUF=65535 works fine. Perhaps the following
patch, which makes setting SO_RCVBUF work like setting SO_SNDBUF, is
the proper solution.

--- linux/net/core/sock.c.0 Tue Jun 11 09:02:45 1996
+++ linux/net/core/sock.c Wed Jun 12 10:49:37 1996
@@ -173,30 +173,32 @@
case SO_SNDBUF:
if(val > SK_WMEM_MAX*2)
val = SK_WMEM_MAX*2;
if(val < 256)
val = 256;
if(val > 65535)
val = 65535;
sk->sndbuf = val;
return 0;

case SO_RCVBUF:
if(val > SK_RMEM_MAX*2)
val = SK_RMEM_MAX*2;
if(val < 256)
val = 256;
+ if(val > 65535)
+ val = 65535;
sk->rcvbuf = val;
return(0);

case SO_KEEPALIVE:
sk->keepopen = valbool;
return(0);

case SO_OOBINLINE:
sk->urginline = valbool;
return(0);

case SO_NO_CHECK:
sk->no_check = valbool;
return(0);

Tom.


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.015 / U:2.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site