Review Request: Patch to selectively bind to interfaces while still allowing broadcast packets

Erich Hoover ehoover at mines.edu
Mon Sep 28 13:55:49 CDT 2009


Attached is a patch I have been working to fix Bug #7929 (C&C 3 network does
not work).  This patch replaces interface-specific bind requests (on UDP
datagrams only) with a global bind and stores the interface index.  The
patch then uses IP_PKTINFO to set the outgoing interface and filter incoming
packets based on interface (checking against the stored interface index from
the initial bind).  Additionally, the patch peeks at packets in "select" and
asynchronous I/O operations to ensure that spurious wakeups do not occur
when a packet comes in from the wrong interface.

I intend to split the patch into the following pieces:
1) UDP broadcast tests (used for making sure everything works)
2) The "bare essentials" (storing and retrieving the interface index, and
setting/filtering the interface)
3) Ensure "select" does not wake up on packets with an interface mismatch
4) Ensure Async WSARecv does not wake up on packets with an interface
mismatch
5) Ensure Async ReadFile does not wake up on packets with an interface
mismatch

I would greatly appreciate any comments people have on this patch.  Thanks
so much!

Erich Hoover
ehoover at mines.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090928/98364090/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cnc3-bind.patch
Type: text/x-diff
Size: 33888 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20090928/98364090/attachment-0001.patch>


More information about the wine-devel mailing list