Bug 5370 - sockopts attempts to set options after the socket is open
sockopts attempts to set options after the socket is open
Status: RESOLVED FIXED
Product: rsync
Classification: Unclassified
Component: core
2.6.9
x86 Linux
: P3 normal
: ---
Assigned To: Wayne Davison
Rsync QA Contact
http://people.freebsd.org/~gordon/rsy...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-02 17:50 UTC by Gordon Tetlow
Modified: 2008-04-15 10:44 UTC (History)
0 users

See Also:


Attachments
Patch to move the setsockopt calls into socket.c (1.41 KB, patch)
2008-04-02 17:51 UTC, Gordon Tetlow
no flags Details
The same patch as above, but applies to 3.0.1 (1.32 KB, patch)
2008-04-03 13:04 UTC, Wayne Davison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Tetlow 2008-04-02 17:50:55 UTC
rsync 2.6.9 (and from the looks of it 3.0.0) attempts to set socket options (either via --sockopts or the rsyncd.conf socket options conf statement) after the socket was listen()ed or connect()ed.

Specifically, I was trying to use SO_RCVBUF and SO_SNDBUF to increase my window size and didn't get anywhere. strace confirmed that the setsockopt call occurred after the socket was connected.

See the patch at the URL which moves the setsockopt calls into socket.c after the sockets are created but before they are connect()ed or listen()ed
Comment 1 Gordon Tetlow 2008-04-02 17:51:51 UTC
Created attachment 3239 [details]
Patch to move the setsockopt calls into socket.c

Added attachment to the bug.
Comment 2 Wayne Davison 2008-04-03 13:04:35 UTC
Created attachment 3240 [details]
The same patch as above, but applies to 3.0.1

I updated the patch to apply to the (soon to be released) 3.0.1.  This is too late to make it into that release, but I'll apply it soon after that.
Comment 3 Wayne Davison 2008-04-15 10:44:20 UTC
I've committed this change to the git repository.