Commit 17248108 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

ws2_32: Fix broadcast address calculation.

parent a10a8eb1
...@@ -2164,7 +2164,7 @@ INT WINAPI WSAIoctl(SOCKET s, ...@@ -2164,7 +2164,7 @@ INT WINAPI WSAIoctl(SOCKET s,
addr = inet_addr(ptr->IpAddressList.IpAddress.String); addr = inet_addr(ptr->IpAddressList.IpAddress.String);
mask = inet_addr(ptr->IpAddressList.IpMask.String); mask = inet_addr(ptr->IpAddressList.IpMask.String);
bcast = addr | (addr & !mask); bcast = addr | ~mask;
intArray->iiAddress.AddressIn.sin_family = AF_INET; intArray->iiAddress.AddressIn.sin_family = AF_INET;
intArray->iiAddress.AddressIn.sin_port = 0; intArray->iiAddress.AddressIn.sin_port = 0;
intArray->iiAddress.AddressIn.sin_addr.WS_s_addr = intArray->iiAddress.AddressIn.sin_addr.WS_s_addr =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment