Hi,

Run the attached program under 2.0.36 and you get:
  Setting socket receive buffer size to 1024
  The socket receive buffer size was set to 1024

Run it under 2.2.14 and you get:
  Setting socket receive buffer size to 1024
  The socket receive buffer size was set to 2048

The code in question (/usr/src/linux/net/core/sock.c) seems to be very
clear - it doubles the value.

What do you think - bug?  Intentional?  Other?

David

-- 
  David Shaw  |  Chief Architect, Streaming Systems  |  Akamai Technologies
+---------------------------------------------------------------------------+
    [EMAIL PROTECTED]   |   617-250-3028   |   http://www.jabberwocky.com/
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>

void main(int argc,char *argv[])
{
  int sock,foo;
  long size=1024;

  sock=socket(AF_INET,SOCK_DGRAM,0);

  printf("Setting socket receive buffer size to %d\n",size);

  setsockopt(sock,SOL_SOCKET,SO_RCVBUF,&size,sizeof(size));

  getsockopt(sock,SOL_SOCKET,SO_RCVBUF,&size,&foo);

  printf("The socket receive buffer size was set to %d\n",size);
}

Reply via email to