mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-31 19:26:42 +00:00
- Merge aicom-network-fixes up to r36973
svn path=/trunk/; revision=36974
This commit is contained in:
@@ -221,10 +221,6 @@ VOID DestroySocket( PAFD_FCB FCB ) {
|
||||
ExFreePool( FCB->LocalAddress );
|
||||
if( FCB->RemoteAddress )
|
||||
ExFreePool( FCB->RemoteAddress );
|
||||
if( FCB->ListenIrp.ConnectionReturnInfo )
|
||||
ExFreePool( FCB->ListenIrp.ConnectionReturnInfo );
|
||||
if( FCB->ListenIrp.ConnectionCallInfo )
|
||||
ExFreePool( FCB->ListenIrp.ConnectionCallInfo );
|
||||
if( FCB->TdiDeviceName.Buffer )
|
||||
ExFreePool(FCB->TdiDeviceName.Buffer);
|
||||
|
||||
|
||||
@@ -628,6 +628,11 @@ VOID LANTransmit(
|
||||
("Called( NdisPacket %x, Offset %d, Adapter %x )\n",
|
||||
NdisPacket, Offset, Adapter));
|
||||
|
||||
if (Adapter->State != LAN_STATE_STARTED) {
|
||||
ProtocolSendComplete(Context, NdisPacket, NDIS_STATUS_NOT_ACCEPTED);
|
||||
return;
|
||||
}
|
||||
|
||||
TI_DbgPrint(DEBUG_DATALINK,
|
||||
("Adapter Address [%02x %02x %02x %02x %02x %02x]\n",
|
||||
Adapter->HWAddress[0] & 0xff,
|
||||
@@ -643,7 +648,6 @@ VOID LANTransmit(
|
||||
|
||||
LanChainCompletion( Adapter, NdisPacket );
|
||||
|
||||
if (Adapter->State == LAN_STATE_STARTED) {
|
||||
switch (Adapter->Media) {
|
||||
case NdisMedium802_3:
|
||||
EHeader = (PETH_HEADER)Data;
|
||||
@@ -713,9 +717,6 @@ VOID LANTransmit(
|
||||
* the situation with IRPs. */
|
||||
if (NdisStatus != NDIS_STATUS_PENDING)
|
||||
ProtocolSendComplete((NDIS_HANDLE)Context, NdisPacket, NdisStatus);
|
||||
} else {
|
||||
ProtocolSendComplete((NDIS_HANDLE)Context, NdisPacket, NDIS_STATUS_CLOSED);
|
||||
}
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
|
||||
@@ -29,6 +29,9 @@ VOID NBSendPackets( PNEIGHBOR_CACHE_ENTRY NCE ) {
|
||||
PLIST_ENTRY PacketEntry;
|
||||
PNEIGHBOR_PACKET Packet;
|
||||
|
||||
if(!(NCE->State & NUD_CONNECTED))
|
||||
return;
|
||||
|
||||
/* Send any waiting packets */
|
||||
PacketEntry = ExInterlockedRemoveHeadList(&NCE->PacketQueue,
|
||||
&NCE->Table->Lock);
|
||||
|
||||
@@ -87,13 +87,13 @@ NTSTATUS TCPListen( PCONNECTION_ENDPOINT Connection, UINT Backlog ) {
|
||||
|
||||
TI_DbgPrint(DEBUG_TCP,("AddressToBind - %x:%x\n", AddressToBind.sin_addr, AddressToBind.sin_port));
|
||||
|
||||
OskitTCPBind( Connection->SocketContext,
|
||||
Connection,
|
||||
&AddressToBind,
|
||||
sizeof(AddressToBind) );
|
||||
Status = TCPTranslateError( OskitTCPBind( Connection->SocketContext,
|
||||
Connection,
|
||||
&AddressToBind,
|
||||
sizeof(AddressToBind) ) );
|
||||
|
||||
Status = TCPTranslateError( OskitTCPListen( Connection->SocketContext,
|
||||
Backlog ) );
|
||||
if (NT_SUCCESS(Status))
|
||||
Status = TCPTranslateError( OskitTCPListen( Connection->SocketContext, Backlog ) );
|
||||
|
||||
TcpipRecursiveMutexLeave( &TCPLock );
|
||||
|
||||
|
||||
@@ -577,21 +577,24 @@ NTSTATUS TCPConnect
|
||||
AddressToConnect.sin_family = AF_INET;
|
||||
AddressToBind = AddressToConnect;
|
||||
|
||||
OskitTCPBind( Connection->SocketContext,
|
||||
Status = TCPTranslateError
|
||||
( OskitTCPBind( Connection->SocketContext,
|
||||
Connection,
|
||||
&AddressToBind,
|
||||
sizeof(AddressToBind) );
|
||||
sizeof(AddressToBind) ) );
|
||||
|
||||
memcpy( &AddressToConnect.sin_addr,
|
||||
&RemoteAddress.Address.IPv4Address,
|
||||
sizeof(AddressToConnect.sin_addr) );
|
||||
AddressToConnect.sin_port = RemotePort;
|
||||
if (NT_SUCCESS(Status)) {
|
||||
memcpy( &AddressToConnect.sin_addr,
|
||||
&RemoteAddress.Address.IPv4Address,
|
||||
sizeof(AddressToConnect.sin_addr) );
|
||||
AddressToConnect.sin_port = RemotePort;
|
||||
|
||||
Status = TCPTranslateError
|
||||
( OskitTCPConnect( Connection->SocketContext,
|
||||
Connection,
|
||||
&AddressToConnect,
|
||||
sizeof(AddressToConnect) ) );
|
||||
Status = TCPTranslateError
|
||||
( OskitTCPConnect( Connection->SocketContext,
|
||||
Connection,
|
||||
&AddressToConnect,
|
||||
sizeof(AddressToConnect) ) );
|
||||
}
|
||||
|
||||
TcpipRecursiveMutexLeave( &TCPLock );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user