mirror of
https://github.com/reactos/reactos.git
synced 2025-06-01 07:28:19 +00:00
- Merge aicom-network-fixes up to r38730
svn path=/trunk/; revision=38743
This commit is contained in:
parent
9452b7e23c
commit
71f5b95706
2 changed files with 17 additions and 15 deletions
|
@ -1553,6 +1553,7 @@ 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.Type = IP_ADDRESS_V4;
|
||||
IF->Broadcast.Address.IPv4Address =
|
||||
IF->Unicast.Address.IPv4Address |
|
||||
~IF->Netmask.Address.IPv4Address;
|
||||
|
@ -1587,6 +1588,8 @@ NTSTATUS DispTdiDeleteIPAddress( PIRP Irp, PIO_STACK_LOCATION IrpSp ) {
|
|||
IF->Unicast.Address.IPv4Address = 0;
|
||||
IF->Netmask.Type = IP_ADDRESS_V4;
|
||||
IF->Netmask.Address.IPv4Address = 0;
|
||||
IF->Broadcast.Type = IP_ADDRESS_V4;
|
||||
IF->Broadcast.Address.IPv4Address = 0;
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
} EndFor(IF);
|
||||
|
|
|
@ -147,7 +147,8 @@ VOID IPDispatchProtocol(
|
|||
TI_DbgPrint(MIN_TRACE, ("IPv6 datagram discarded.\n"));
|
||||
return;
|
||||
default:
|
||||
Protocol = 0;
|
||||
TI_DbgPrint(MIN_TRACE, ("Unrecognized datagram discarded.\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (Protocol < IP_PROTOCOL_TABLE_SIZE)
|
||||
|
@ -308,22 +309,20 @@ VOID IPRemoveInterfaceRoute( PIP_INTERFACE IF ) {
|
|||
PNEIGHBOR_CACHE_ENTRY NCE;
|
||||
IP_ADDRESS GeneralRoute;
|
||||
|
||||
TCPDisposeInterfaceData( IF->TCPContext );
|
||||
IF->TCPContext = NULL;
|
||||
|
||||
TI_DbgPrint(DEBUG_IP,("Removing interface Addr %s\n", A2S(&IF->Unicast)));
|
||||
TI_DbgPrint(DEBUG_IP,(" Mask %s\n", A2S(&IF->Netmask)));
|
||||
|
||||
AddrWidenAddress(&GeneralRoute,&IF->Unicast,&IF->Netmask);
|
||||
|
||||
RouterRemoveRoute(&GeneralRoute, &IF->Unicast);
|
||||
|
||||
/* Remove permanent NCE, but first we have to find it */
|
||||
NCE = NBLocateNeighbor(&IF->Unicast);
|
||||
if (NCE)
|
||||
NBRemoveNeighbor(NCE);
|
||||
else
|
||||
TI_DbgPrint(DEBUG_IP, ("Could not delete IF route (0x%X)\n", IF));
|
||||
{
|
||||
TCPDisposeInterfaceData( IF->TCPContext );
|
||||
|
||||
TI_DbgPrint(DEBUG_IP,("Removing interface Addr %s\n", A2S(&IF->Unicast)));
|
||||
TI_DbgPrint(DEBUG_IP,(" Mask %s\n", A2S(&IF->Netmask)));
|
||||
|
||||
AddrWidenAddress(&GeneralRoute,&IF->Unicast,&IF->Netmask);
|
||||
|
||||
RouterRemoveRoute(&GeneralRoute, &IF->Unicast);
|
||||
|
||||
NBRemoveNeighbor(NCE);
|
||||
}
|
||||
}
|
||||
|
||||
VOID IPUnregisterInterface(
|
||||
|
|
Loading…
Reference in a new issue