RFC: Revised patchset to fix Bug 7929 (C&C 3 network does not work)

Erich Hoover ehoover at mines.edu
Sat Sep 18 21:44:27 CDT 2010


I realize it's been some time since I've submitted something for the
networking problems with the C&C games, but I believe I've come up
with something that resolves the major show-stopping issue that was
discussed previously.  Here is the original thread, for reference:
    http://www.winehq.org/pipermail/wine-devel/2009-October/079099.html

Specifically, this set of patches is revised to address the problem of
throwing away packets destined for the incorrect interface in a
multi-threaded/multi-process environment.  The approach used here is
to create a global (named) POSIX.1-2001 semaphore for each socket with
the form
    wine-ifacelock-FD
, where "FD" is the Unix file descriptor corresponding to the socket
at hand.  These semaphores are only created for UDP sockets bound to a
specific interface and are locked/unlocked by both the Wine user-space
and the Wine server.

These patches are against wine-1.3.3 and are split apart according to
function.  The most revised portions since the original set are 2/6
(server-side creation of semaphore), 3/6 (locking and unlocking), and
6/6 (server-side locking and unlocking).  If I could get some feedback
on these patches then I would greatly appreciate it, it'd be really
nice to finally get this issue resolved.  Thanks in advance!

[1/6] ws2_32/tests: Add UDP broadcast tests:
	http://www.compholio.com/wine-kane/patches/2010-09-18/0001-ws2_32-tests-Add-UDP-broadcast-tests.patch
[2/6] server: Add mechanism for storing an interface ID with a socket:
	http://www.compholio.com/wine-kane/patches/2010-09-18/0002-server-Add-mechanism-for-storing-an-interface-ID-wit.patch
[3/6] ws2_32: Patch to selectively bind to interfaces while still
allowing broadcast packets:
	http://www.compholio.com/wine-kane/patches/2010-09-18/0003-ws2_32-Patch-to-selectively-bind-to-interfaces-while.patch
[4/6] ws2_32: Ensure select does not wake up on packets with an
interface mismatch:
	http://www.compholio.com/wine-kane/patches/2010-09-18/0004-ws2_32-Ensure-select-does-not-wake-up-on-packets-wit.patch
[5/6] ws2_32: Ensure Async WSARecv does not wake up on packets with an
interface mismatch:
	http://www.compholio.com/wine-kane/patches/2010-09-18/0005-ws2_32-Ensure-Async-WSARecv-does-not-wake-up-on-pack.patch
[6/6] server: Ensure Async ReadFile does not wake up on packets with
an interface mismatch:
	http://www.compholio.com/wine-kane/patches/2010-09-18/0006-server-Ensure-Async-ReadFile-does-not-wake-up-on-pac.patch

Erich Hoover
ehoover at mines.edu



More information about the wine-devel mailing list