[PATCH 2/2] ws2_32: Permit broadcast packets on interface-bound sockets for systems with IP_UNICAST_IF and SO_ATTACH_FILTER (try 2).

Erich E. Hoover ehoover at mymail.mines.edu
Wed Sep 26 17:42:07 CDT 2012


This patch is a continuation of the previous patch that adds support
for Linux systems (kernel 3.4-rc1 and newer).  Since the Linux
networking maintainer has been unwilling to create a socket option
identical to SO_BINDTODEVICE that does not require administrative
permissions, I went to the effort of getting IP_UNICAST_IF added to
the kernel.  In addition to giving us the ability to support
IP_UNICAST_IF, the addition of this option gives us a new way to solve
Bug #7929.  This new approach involves restricting outgoing packets
through the use of IP_UNICAST_IF and filtering incoming packets using
Linux Socket Filters.  It is important to note that neither of these
features require administrative privileges, so I hope that this patch
provides a good solution to finally close Bug #7929.  This version of
the patch has been revised to simplify the handling of error cases,
has had the "incoming" and "outgoing" functions reorganized to be part
of interface_bind(), and has had the filter rule moved to the top of
the socket.c file.  These changes have reduced the number of
additional lines of code from 92 lines to 39 lines, resulting in a
much cleaner patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-ws2_32-Permit-broadcast-packets-on-interface-bound-s.patch
Type: application/octet-stream
Size: 3784 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120926/efa2f30c/attachment.obj>


More information about the wine-patches mailing list