- Allow binding to an interface's broadcast address
authorCameron Gutman <aicommander@gmail.com>
Thu, 20 Aug 2009 00:54:27 +0000 (00:54 +0000)
committerCameron Gutman <aicommander@gmail.com>
Thu, 20 Aug 2009 00:54:27 +0000 (00:54 +0000)
 - Set address type

svn path=/trunk/; revision=42787

reactos/lib/drivers/ip/network/interface.c

index 4818172..78d1149 100644 (file)
@@ -88,7 +88,6 @@ NTSTATUS GetInterfaceName( PIP_INTERFACE Interface,
  * RETURNS:
  *     Pointer to address entry if found, NULL if not found
  * NOTES:
- *     Only unicast addresses are considered.
  *     If found, the address is referenced
  */
 BOOLEAN AddrLocateADEv4(
@@ -101,7 +100,9 @@ BOOLEAN AddrLocateADEv4(
     TcpipAcquireSpinLock(&InterfaceListLock, &OldIrql);
 
     ForEachInterface(CurrentIF) {
-       if( AddrIsEqualIPv4( &CurrentIF->Unicast, MatchAddress ) ) {
+       if( AddrIsEqualIPv4( &CurrentIF->Unicast, MatchAddress ) ||
+            AddrIsEqualIPv4( &CurrentIF->Broadcast, MatchAddress ) ) {
+            Address->Type = IP_ADDRESS_V4;
            Address->Address.IPv4Address = MatchAddress;
            Matched = TRUE; break;
        }