[lkml]   [2002]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: setsockopt(SOL_SOCKET, SO_SNDBUF) broken on 2.4.18?
    On Mon, 25 Feb 2002, Raphael Manfredi wrote:

    > Hi,
    > I run:
    > Linux nice 2.4.18-pre7 #1 SMP Mon Jan 28 23:12:48 MET 2002 i686 unknown
    > I noticed that whenever I do:
    > setsockopt(fd, SOL_SOCKET, SO_SNDBUF....)
    > followed by
    > getsockopt(fd, SOL_SOCKET, SO_SNDBUF....)
    > to verify what the kernel has set, I read TWICE as much the amount used
    > for the set. That is, if I set 8192, I read 16384. Therefore, to set
    > the correct size, I need to half the parameter first.

    This came up a few months ago. Don't halve the size. The value was
    explained to NOT be a bug even though it doesn't make sense to us
    mortals. Just set the buffer size without reading anything. It will
    be fine. The explaination was somewhat smokey, but It seems as though
    two buffers are set aside or something like that. Just don't read
    the size. Set it and forget it.

    Dick Johnson

    Penguin : Linux version 2.4.1 on an i686 machine (797.90 BogoMips).

    111,111,111 * 111,111,111 = 12,345,678,987,654,321

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:20    [W:0.020 / U:2.992 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site