mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
[DHCPCSVC]
- Set the SO_BROADCAST option to 1 before we send data to the broadcast address so we don't get stonewalled by mswsock - DHCP is now compatible with mswsock_new svn path=/trunk/; revision=48493
This commit is contained in:
@@ -209,7 +209,7 @@ DWORD WINAPI AdapterDiscoveryThread(LPVOID Context) {
|
||||
PDHCP_ADAPTER Adapter = NULL;
|
||||
HANDLE AdapterStateChangedEvent = (HANDLE)Context;
|
||||
struct interface_info *ifi = NULL;
|
||||
int i, AdapterCount = 0;
|
||||
int i, AdapterCount = 0, Broadcast;
|
||||
|
||||
/* FIXME: Kill this thread when the service is stopped */
|
||||
|
||||
@@ -285,6 +285,15 @@ DWORD WINAPI AdapterDiscoveryThread(LPVOID Context) {
|
||||
socket( AF_INET, SOCK_DGRAM, IPPROTO_UDP );
|
||||
|
||||
if (DhcpSocket != INVALID_SOCKET) {
|
||||
|
||||
/* Allow broadcast on this socket */
|
||||
Broadcast = 1;
|
||||
setsockopt(DhcpSocket,
|
||||
SOL_SOCKET,
|
||||
SO_BROADCAST,
|
||||
(const char *)&Broadcast,
|
||||
sizeof(Broadcast));
|
||||
|
||||
Adapter->ListenAddr.sin_family = AF_INET;
|
||||
Adapter->ListenAddr.sin_port = htons(LOCAL_PORT);
|
||||
Adapter->BindStatus =
|
||||
|
||||
Reference in New Issue
Block a user