Begin forwarded message:
Date: Thu, 30 Mar 2006 09:33:54 -0800 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [Bugme-new] [Bug 6309] New: SO_RCVBUF doubled on set not halved on get http://bugzilla.kernel.org/show_bug.cgi?id=6309 Summary: SO_RCVBUF doubled on set not halved on get Kernel Version: 2.6.13-1.1526_FC4 Status: NEW Severity: normal Owner: [EMAIL PROTECTED] Submitter: [EMAIL PROTECTED] Most recent kernel where this bug did not occur:2.6.13-1.1526_FC4 Distribution:Fedora Core 4 Hardware Environment: Software Environment: Problem Description: getsockopt of SO_RCVBUF always reports double the value that you can set with setsockopt. Thus if you call getsockopt to find the current value, change it and then attempt to restore the old value you will double the old value. The setsockopt SO_RCVBUF code in net/core/sock.c:291 is doubling the passed in value. sk->sk_rcvbuf = val * 2; But the getsockopt SO_RCVBUF code in net/core/sock.c:495 does not halve it. case SO_RCVBUF: v.val = sk->sk_rcvbuf; Either the set code should not double val or the get code should halve for consistency. If this is deliberate a comment would be useful to explain why. Steps to reproduce: ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html