Recompute broadcast address upon ip change (spotted by elrond)
authorArt Yerkes <art.yerkes@gmail.com>
Tue, 23 May 2006 21:24:01 +0000 (21:24 +0000)
committerArt Yerkes <art.yerkes@gmail.com>
Tue, 23 May 2006 21:24:01 +0000 (21:24 +0000)
svn path=/trunk/; revision=21996

reactos/drivers/network/tcpip/tcpip/dispatch.c

index 0c7b111..635a4ae 100644 (file)
@@ -1522,6 +1522,9 @@ NTSTATUS DispTdiSetIPAddress( PIRP Irp, PIO_STACK_LOCATION IrpSp ) {
             IF->Unicast.Address.IPv4Address = IpAddrChange->Address;
             IF->Netmask.Type = IP_ADDRESS_V4;
             IF->Netmask.Address.IPv4Address = IpAddrChange->Netmask;
+           IF->Broadcast.Address.IPv4Address =
+               IF->Unicast.Address.IPv4Address |
+               ~IF->Netmask.Address.IPv4Address;
 
             TI_DbgPrint(MID_TRACE,("New Unicast Address: %x\n",
                                    IF->Unicast.Address.IPv4Address));