[Bug 26031] µTorrent loses the ability of listening to incoming connections

wine-bugs at winehq.org wine-bugs at winehq.org
Thu Nov 10 21:35:54 CST 2011


--- Comment #21 from Bruno Jesus <00cpxxx at gmail.com> 2011-11-10 21:35:54 CST ---
Created attachment 37438
  --> http://bugs.winehq.org/attachment.cgi?id=37438
Try to use SO_REUSEADDR by default

Well, after reading a lot of internet pages and trying several different
attempts I think it's possible to say that it's a kernel bug or a
characteristic of the kernel tcp implementation.

The attached patch forces SO_REUSEADDR in before every bind in an attempt to
fix the problem but it only works if the program exits cleanly (so the kernel
sets the socket to TIME_WAIT), if you do "wineserver -k" the socket will remain
opened in an unknow broken state and no applications will be able to use it
(wine or native linux apps).

Output of strace:
getsockopt(24, SOL_SOCKET, SO_REUSEADDR, [0], [4]) = 0
setsockopt(24, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(24, {sa_family=AF_INET, sin_port=htons(43012), sin_addr=inet_addr("0.     
0.0.0")}, 16) = -1 EADDRINUSE (Address already in use)

It's possible to see that I'm checking if SO_REUSEADDR is enabled and then
enable it. But the bind fails anyway.

I still think this is a WONTFIX and kernel related. I'm using 2.6.32-5-amd64,
maybe newer kernels behave in a different way. If you have a newer kernel can
you test the patch?

Useful links:

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the wine-bugs mailing list