Cameron Gutman [Wed, 10 Sep 2008 07:43:05 +0000 (07:43 +0000)]
- Return the correct status
svn path=/branches/aicom-network-fixes/; revision=36107
Cameron Gutman [Wed, 10 Sep 2008 04:59:12 +0000 (04:59 +0000)]
- Don't call IoCompleteRequest while holding a spin lock because it can cause deadlocks
svn path=/branches/aicom-network-fixes/; revision=36102
Cameron Gutman [Wed, 10 Sep 2008 03:54:46 +0000 (03:54 +0000)]
- Remove the spin locks around NdisSend because it causes a crash in kvmnet
svn path=/branches/aicom-network-fixes/; revision=36101
Cameron Gutman [Wed, 10 Sep 2008 02:52:22 +0000 (02:52 +0000)]
- Set ContextSize when we allocate it
- Remove the context size check so we always create a new one now
- Now we succeed regardless of the current context size
svn path=/branches/aicom-network-fixes/; revision=36100
Cameron Gutman [Tue, 9 Sep 2008 19:47:12 +0000 (19:47 +0000)]
- Fix a memory leak
svn path=/branches/aicom-network-fixes/; revision=36094
Cameron Gutman [Tue, 9 Sep 2008 00:58:44 +0000 (00:58 +0000)]
- Release the spin lock before returning
svn path=/branches/aicom-network-fixes/; revision=36075
Cameron Gutman [Tue, 9 Sep 2008 00:17:02 +0000 (00:17 +0000)]
- Remove the adapter from the global adapter list if we fail
svn path=/branches/aicom-network-fixes/; revision=36074
Cameron Gutman [Mon, 8 Sep 2008 23:42:14 +0000 (23:42 +0000)]
- Make sure we set a failure status when we fail so we don't complete with NDIS_STATUS_SUCCESS when we really failed
svn path=/branches/aicom-network-fixes/; revision=36071
Cameron Gutman [Mon, 8 Sep 2008 23:27:52 +0000 (23:27 +0000)]
- Return the actual status not NDIS_STATUS_SUCCESS always
svn path=/branches/aicom-network-fixes/; revision=36070
Cameron Gutman [Sun, 7 Sep 2008 19:38:21 +0000 (19:38 +0000)]
- Make sure we successfully allocated memory
svn path=/branches/aicom-network-fixes/; revision=36042
Cameron Gutman [Sat, 6 Sep 2008 21:45:23 +0000 (21:45 +0000)]
- Return NDIS_STATUS_RESOURCES not NDIS_STATUS_NOT_ACCEPTED when we fail to allocate memory
svn path=/branches/aicom-network-fixes/; revision=36009
Cameron Gutman [Sat, 6 Sep 2008 21:42:58 +0000 (21:42 +0000)]
- Forgot this file from r36006
svn path=/branches/aicom-network-fixes/; revision=36008
Cameron Gutman [Sat, 6 Sep 2008 21:36:55 +0000 (21:36 +0000)]
- Check status from RawIPStartup, UDPStartup, and TCPStartup
svn path=/branches/aicom-network-fixes/; revision=36007
Cameron Gutman [Sat, 6 Sep 2008 21:30:09 +0000 (21:30 +0000)]
- Make PortsStartup return NTSTATUS so we can make sure memory allocated succeeded
- Change the callers to check the return status
svn path=/branches/aicom-network-fixes/; revision=36006
Cameron Gutman [Sat, 6 Sep 2008 20:52:54 +0000 (20:52 +0000)]
- Fix a code typo
svn path=/branches/aicom-network-fixes/; revision=36004
Cameron Gutman [Sat, 6 Sep 2008 20:42:10 +0000 (20:42 +0000)]
- Use NewBuf instead of Data so we actually use the buffer we allocate
svn path=/branches/aicom-network-fixes/; revision=36003
Cameron Gutman [Sat, 6 Sep 2008 20:37:06 +0000 (20:37 +0000)]
- Return NDIS_STATUS_RESOURCES not STATUS_NO_MEMORY
svn path=/branches/aicom-network-fixes/; revision=36002
Cameron Gutman [Sat, 6 Sep 2008 20:27:56 +0000 (20:27 +0000)]
- Return TDI_NO_RESOURCES instead of TDI_INVALID_REQUEST when we can't allocate memory
svn path=/branches/aicom-network-fixes/; revision=36001
Cameron Gutman [Sat, 6 Sep 2008 20:18:42 +0000 (20:18 +0000)]
- Code cleanup
svn path=/branches/aicom-network-fixes/; revision=36000
Cameron Gutman [Fri, 5 Sep 2008 19:51:18 +0000 (19:51 +0000)]
- Handle AllocatedResources and AllocatedResourcesTranslated separately
- Fix a memory leak
- Fix a handle leak
svn path=/branches/aicom-network-fixes/; revision=35964
Cameron Gutman [Thu, 4 Sep 2008 19:08:08 +0000 (19:08 +0000)]
- Fix cleanup code
- We could possibly end up there with a NULL FileHandleObject and return a garbage FileHandle or crash
- Now we always return a NULL FileHandle when we fail and free FileHandleObject if it has been allocated
svn path=/branches/aicom-network-fixes/; revision=35946
Cameron Gutman [Thu, 4 Sep 2008 18:42:49 +0000 (18:42 +0000)]
- Fix 2 memory leaks
- Set ParameterValue to NULL on failure
svn path=/branches/aicom-network-fixes/; revision=35944
Cameron Gutman [Wed, 3 Sep 2008 23:37:09 +0000 (23:37 +0000)]
- Accept STATUS_SUCCESS also as done in config.c
svn path=/branches/aicom-network-fixes/; revision=35919
Cameron Gutman [Tue, 2 Sep 2008 23:47:05 +0000 (23:47 +0000)]
- Fail if PrepareARPPacket returned NULL
- Fixes another possible crash
svn path=/branches/aicom-network-fixes/; revision=35899
Cameron Gutman [Tue, 2 Sep 2008 23:36:46 +0000 (23:36 +0000)]
- Move the NULL check immediately after the memory is allocated
svn path=/branches/aicom-network-fixes/; revision=35898
Cameron Gutman [Tue, 2 Sep 2008 23:26:32 +0000 (23:26 +0000)]
- Fail if we didn't successfully add the header
svn path=/branches/aicom-network-fixes/; revision=35897
Cameron Gutman [Tue, 2 Sep 2008 23:15:28 +0000 (23:15 +0000)]
- Set UDPInitialized to FALSE at the end of UDPShutdown
svn path=/branches/aicom-network-fixes/; revision=35896
Cameron Gutman [Tue, 2 Sep 2008 18:38:42 +0000 (18:38 +0000)]
- Initially set NdisProtocolHandle to NULL
svn path=/branches/aicom-network-fixes/; revision=35889
Cameron Gutman [Mon, 1 Sep 2008 22:59:04 +0000 (22:59 +0000)]
- STATUS_SUCCESS -> NDIS_STATUS_SUCCESS
svn path=/branches/aicom-network-fixes/; revision=35868
Cameron Gutman [Mon, 1 Sep 2008 22:48:03 +0000 (22:48 +0000)]
- Set Status
svn path=/branches/aicom-network-fixes/; revision=35867
Cameron Gutman [Mon, 1 Sep 2008 13:12:34 +0000 (13:12 +0000)]
- Initially set Packet to NULL
svn path=/branches/aicom-network-fixes/; revision=35856
Cameron Gutman [Mon, 1 Sep 2008 03:58:34 +0000 (03:58 +0000)]
- Don't return NDIS_STATUS_SUCCESS when we really failed
svn path=/branches/aicom-network-fixes/; revision=35849
Cameron Gutman [Mon, 1 Sep 2008 03:13:35 +0000 (03:13 +0000)]
- Initially set PoolHandle, ConfigurationHandle, KeyHandle, and Filter to NULL
- Initially set PortOffset to 0
- Fix 4 memory leaks
- Remove a useless if
svn path=/branches/aicom-network-fixes/; revision=35848
Cameron Gutman [Sat, 30 Aug 2008 03:29:41 +0000 (03:29 +0000)]
- Change the status to STATUS_SUCCESS if TdiReceive returns STATUS_PENDING
svn path=/branches/aicom-network-fixes/; revision=35787
Cameron Gutman [Sat, 30 Aug 2008 02:53:20 +0000 (02:53 +0000)]
- Check if TdiBuildNullConnectionInfo completed successfully
- Add a comment
- Fail if we can't allocate Qelt
svn path=/branches/aicom-network-fixes/; revision=35786
Cameron Gutman [Sat, 30 Aug 2008 02:40:26 +0000 (02:40 +0000)]
- FCB->State gets set to SOCKET_STATE_CONNECTED in MakeSocketIntoConnection
svn path=/branches/aicom-network-fixes/; revision=35785
Cameron Gutman [Sat, 30 Aug 2008 02:30:27 +0000 (02:30 +0000)]
- Check if MakeSocketIntoConnection succeeded
- Check if TaCopyTransportAddress succeeded
svn path=/branches/aicom-network-fixes/; revision=35784
Cameron Gutman [Sat, 30 Aug 2008 02:04:30 +0000 (02:04 +0000)]
- Check that we successfully allocated memory
- Return TDI_NO_RESOURCES instead of STATUS_NO_MEMORY
svn path=/branches/aicom-network-fixes/; revision=35783
Cameron Gutman [Fri, 29 Aug 2008 14:33:42 +0000 (14:33 +0000)]
- Returning STATUS_BUFFER_OVERFLOW is ok also since we're only trying to get DriverKeyLength
svn path=/branches/aicom-network-fixes/; revision=35761
Cameron Gutman [Fri, 29 Aug 2008 04:23:10 +0000 (04:23 +0000)]
- Revert my last commit
- Looks like this is meant to fail
- I added a comment so no one does this again
svn path=/branches/aicom-network-fixes/; revision=35745
Cameron Gutman [Fri, 29 Aug 2008 03:59:25 +0000 (03:59 +0000)]
- Fix a code typo resulting in calls to MiQueryResources to return early
svn path=/branches/aicom-network-fixes/; revision=35744
Cameron Gutman [Fri, 29 Aug 2008 02:19:16 +0000 (02:19 +0000)]
- Free the address we've previously allocated if needed
svn path=/branches/aicom-network-fixes/; revision=35743
Cameron Gutman [Fri, 29 Aug 2008 01:08:55 +0000 (01:08 +0000)]
- Set Handle to NULL so we don't try to close it later
svn path=/branches/aicom-network-fixes/; revision=35741
Cameron Gutman [Wed, 27 Aug 2008 21:45:45 +0000 (21:45 +0000)]
- Don't handle OSK_EINPROGRESS since TCPTranslateError already has done the conversion to STATUS_PENDING
svn path=/branches/aicom-network-fixes/; revision=35714
Cameron Gutman [Tue, 26 Aug 2008 02:57:12 +0000 (02:57 +0000)]
- Fix many memory leaks
- Complete with the correct status
svn path=/branches/aicom-network-fixes/; revision=35656
Cameron Gutman [Tue, 26 Aug 2008 00:47:22 +0000 (00:47 +0000)]
- Fix a memory leak
svn path=/branches/aicom-network-fixes/; revision=35653
Cameron Gutman [Sun, 24 Aug 2008 19:53:16 +0000 (19:53 +0000)]
- Revert my whole ASSERT mess
- This fixes Qemu
svn path=/branches/aicom-network-fixes/; revision=35611
Cameron Gutman [Sun, 24 Aug 2008 19:28:25 +0000 (19:28 +0000)]
- Apply the same change in my branch as I did to trunk in r35602
svn path=/branches/aicom-network-fixes/; revision=35610
Cameron Gutman [Sun, 24 Aug 2008 19:21:41 +0000 (19:21 +0000)]
- Add another missing PollReeval
svn path=/branches/aicom-network-fixes/; revision=35609
Cameron Gutman [Sun, 24 Aug 2008 18:32:19 +0000 (18:32 +0000)]
- Revert r35601
- This should always be set if FCB->CurrentThread is non-NULL
svn path=/branches/aicom-network-fixes/; revision=35607
Cameron Gutman [Sun, 24 Aug 2008 16:20:14 +0000 (16:20 +0000)]
- Set FCB->Locked to TRUE after we increment the lock count
svn path=/branches/aicom-network-fixes/; revision=35601
Cameron Gutman [Sun, 24 Aug 2008 13:56:35 +0000 (13:56 +0000)]
- Add some missing calls to PollReeval
- Move an existing PollReeval to always be called
svn path=/branches/aicom-network-fixes/; revision=35597
Cameron Gutman [Sun, 24 Aug 2008 13:25:19 +0000 (13:25 +0000)]
- Fail if DatagramRecv->Address is NULL
svn path=/branches/aicom-network-fixes/; revision=35596
Cameron Gutman [Sun, 24 Aug 2008 02:55:26 +0000 (02:55 +0000)]
- Set *ConnectionInfo to NULL if we can't allocate memory for ConnInfo
svn path=/branches/aicom-network-fixes/; revision=35589
Cameron Gutman [Sun, 24 Aug 2008 01:34:17 +0000 (01:34 +0000)]
- Skip ObReferenceObjectByHandle if HandleArray[i].Handle is NULL
- Fail if ObReferenceObjectByHandle didn't succeed
- Remove a bad ASSERT I added in my last commit
svn path=/branches/aicom-network-fixes/; revision=35583
Cameron Gutman [Sun, 24 Aug 2008 01:09:48 +0000 (01:09 +0000)]
- Fail if MmProbeAndLockPages doesn't succeed
- Fail if IoAllocateMdl returns NULL
- Add some ASSERTs
svn path=/branches/aicom-network-fixes/; revision=35582
Cameron Gutman [Sat, 23 Aug 2008 22:06:49 +0000 (22:06 +0000)]
- Make sure IPAddr is non-NULL
- Change STATUS_UNSUCCESSFUL to STATUS_INVALID_PARAMETER
svn path=/branches/aicom-network-fixes/; revision=35579
Cameron Gutman [Sat, 23 Aug 2008 21:53:37 +0000 (21:53 +0000)]
- Code cleanup
- Make sure FCB->RemoteAddress is non-NULL
svn path=/branches/aicom-network-fixes/; revision=35578
Cameron Gutman [Sat, 23 Aug 2008 21:41:10 +0000 (21:41 +0000)]
- Make sure FCB->AddressFrom is non-NULL
svn path=/branches/aicom-network-fixes/; revision=35577
Cameron Gutman [Fri, 22 Aug 2008 19:35:20 +0000 (19:35 +0000)]
- More STATUS_UNSUCCESSFUL to STATUS_INVALID_PARAMETER changes
svn path=/branches/aicom-network-fixes/; revision=35538
Cameron Gutman [Fri, 22 Aug 2008 19:30:33 +0000 (19:30 +0000)]
- Handle STATUS_INVALID_PARAMETER
svn path=/branches/aicom-network-fixes/; revision=35537
Cameron Gutman [Fri, 22 Aug 2008 19:26:30 +0000 (19:26 +0000)]
- Return a more accurate status (STATUS_INVALID_PARAMETER) than STATUS_UNSUCCESSFUL when a parameter is NULL
svn path=/branches/aicom-network-fixes/; revision=35536
Cameron Gutman [Thu, 21 Aug 2008 14:46:03 +0000 (14:46 +0000)]
- Replace MmMapLockedPages with MmGetSystemAddressForMdlSafe
- Add a check to UnlockRequest
- Enclose MmProbeAndLockPages in SEH
- Fixes bug 3672
svn path=/branches/aicom-network-fixes/; revision=35507
Cameron Gutman [Wed, 20 Aug 2008 19:06:43 +0000 (19:06 +0000)]
- Reapply r35481
svn path=/branches/aicom-network-fixes/; revision=35486
Cameron Gutman [Wed, 20 Aug 2008 18:50:26 +0000 (18:50 +0000)]
- Fix IRP cancellation issues
- Ping doesn't hang anymore
svn path=/branches/aicom-network-fixes/; revision=35485
Cameron Gutman [Wed, 20 Aug 2008 18:46:38 +0000 (18:46 +0000)]
- Revert 35477-35481
svn path=/branches/aicom-network-fixes/; revision=35484
Cameron Gutman [Wed, 20 Aug 2008 17:29:01 +0000 (17:29 +0000)]
- Fix handling of cancelled IRPs
svn path=/branches/aicom-network-fixes/; revision=35481
Cameron Gutman [Wed, 20 Aug 2008 14:56:12 +0000 (14:56 +0000)]
- Don't forget about ConnectIrp (This fix was lost in the merge)
- Don't destroy the same socket twice
- Don't unlock the same socket twice
- Don't destroy a socket with pending IRPs
svn path=/branches/aicom-network-fixes/; revision=35480
Cameron Gutman [Wed, 20 Aug 2008 14:48:42 +0000 (14:48 +0000)]
- Fix build
svn path=/branches/aicom-network-fixes/; revision=35479
Cameron Gutman [Wed, 20 Aug 2008 14:43:33 +0000 (14:43 +0000)]
- The rest of the merge
- This will most likely need fixing later
svn path=/branches/aicom-network-fixes/; revision=35478
Cameron Gutman [Wed, 20 Aug 2008 14:21:08 +0000 (14:21 +0000)]
- Reapply arty's datagram cancellation work
- Part 1 of 3
svn path=/branches/aicom-network-fixes/; revision=35477
Cameron Gutman [Wed, 20 Aug 2008 01:42:12 +0000 (01:42 +0000)]
- Move LockBuffers
- Remove a duplicate debug print
svn path=/branches/aicom-network-fixes/; revision=35469
Cameron Gutman [Wed, 20 Aug 2008 01:10:13 +0000 (01:10 +0000)]
- Use FCB->Connection.Object instead of FCB->AddressFile.Object
- Spotted by Arty
svn path=/branches/aicom-network-fixes/; revision=35468
Cameron Gutman [Tue, 19 Aug 2008 23:50:41 +0000 (23:50 +0000)]
- Fix a bug that resulted in the status getting changed if TdiQueryInformation failed
svn path=/branches/aicom-network-fixes/; revision=35467
Cameron Gutman [Tue, 19 Aug 2008 23:44:11 +0000 (23:44 +0000)]
- Use MmGetSystemAddressForMdlSafe instead of MmMapLockedPages
- Noticed by Alex
svn path=/branches/aicom-network-fixes/; revision=35466
Cameron Gutman [Tue, 19 Aug 2008 21:45:08 +0000 (21:45 +0000)]
- Fix a memory leak
svn path=/branches/aicom-network-fixes/; revision=35463
Cameron Gutman [Tue, 19 Aug 2008 17:45:53 +0000 (17:45 +0000)]
- Make sure we have an mdl and a buffer
svn path=/branches/aicom-network-fixes/; revision=35457
Cameron Gutman [Tue, 19 Aug 2008 16:23:01 +0000 (16:23 +0000)]
- SEHify LockRequest
- Free everything and return if MmMapLockedPages fails
svn path=/branches/aicom-network-fixes/; revision=35454
Cameron Gutman [Tue, 19 Aug 2008 16:06:36 +0000 (16:06 +0000)]
- MmMapLockedPages takes KPROCESSOR_MODE not LOCK_OPERATION as the second parameter
svn path=/branches/aicom-network-fixes/; revision=35453
Cameron Gutman [Tue, 19 Aug 2008 04:36:05 +0000 (04:36 +0000)]
- Make sure we don't complete with STATUS_SUCCESS if MmMapLockedPages fails
- Move and enable MmUnlockPages and IoFreeMdl
svn path=/branches/aicom-network-fixes/; revision=35446
Cameron Gutman [Tue, 19 Aug 2008 00:19:18 +0000 (00:19 +0000)]
- Release the spin lock
svn path=/branches/aicom-network-fixes/; revision=35441
Cameron Gutman [Mon, 18 Aug 2008 23:41:23 +0000 (23:41 +0000)]
- Use the correct ioctl
svn path=/branches/aicom-network-fixes/; revision=35439
Cameron Gutman [Mon, 18 Aug 2008 23:35:32 +0000 (23:35 +0000)]
- Don't hardcode the Ioctl
svn path=/branches/aicom-network-fixes/; revision=35438
Cameron Gutman [Mon, 18 Aug 2008 14:00:27 +0000 (14:00 +0000)]
- Call MmProbeAndLockPages for SysMdl
svn path=/branches/aicom-network-fixes/; revision=35431
Cameron Gutman [Mon, 18 Aug 2008 00:05:05 +0000 (00:05 +0000)]
- Handle STATUS_FILE_CLOSED
svn path=/branches/aicom-network-fixes/; revision=35420
Cameron Gutman [Sun, 17 Aug 2008 22:12:31 +0000 (22:12 +0000)]
- Change STATUS_UNSUCCESSFUL to STATUS_FILE_CLOSED
- Move the Irp->Cancel check after SocketAcquireStateLock to fix a possible crash
- Change STATUS_INVALID_PARAMETER to STATUS_FILE_CLOSED
- Move SocketAcquireStateLock in front of the check for a NULL return from LockRequest to prevent another possible crash
svn path=/branches/aicom-network-fixes/; revision=35419
Cameron Gutman [Sun, 17 Aug 2008 21:48:09 +0000 (21:48 +0000)]
- Call SocketStateUnlock before returning
- Don't complete the IRP again in the completion routine
svn path=/branches/aicom-network-fixes/; revision=35418
Cameron Gutman [Sun, 17 Aug 2008 08:17:03 +0000 (08:17 +0000)]
- Add debug prints for failure statuses
svn path=/branches/aicom-network-fixes/; revision=35404
Cameron Gutman [Sat, 16 Aug 2008 21:16:41 +0000 (21:16 +0000)]
- Make sure we successfully allocated ConnectionReturnInfo and ConnectionCallInfo
- Make sure ObReferenceObjectByHandle was successful
svn path=/branches/aicom-network-fixes/; revision=35398
Cameron Gutman [Sat, 16 Aug 2008 15:06:12 +0000 (15:06 +0000)]
- Move SocketAcquireStateLock out of SEH
svn path=/branches/aicom-network-fixes/; revision=35393
Cameron Gutman [Sat, 16 Aug 2008 14:23:58 +0000 (14:23 +0000)]
- Move MmUnlockPages to the proper place (still commented out though)
svn path=/branches/aicom-network-fixes/; revision=35391
Cameron Gutman [Sat, 16 Aug 2008 11:59:54 +0000 (11:59 +0000)]
- Fix another memory leak
svn path=/branches/aicom-network-fixes/; revision=35385
Cameron Gutman [Sat, 16 Aug 2008 00:28:33 +0000 (00:28 +0000)]
- Raise the maximum IRQL that this routine is callable to APC_LEVEL
svn path=/branches/aicom-network-fixes/; revision=35363
Cameron Gutman [Fri, 15 Aug 2008 18:26:52 +0000 (18:26 +0000)]
- Fix a memory leak that occurs when AfdSetContext is called with a buffer that is too small
- Properly return STATUS_BUFFER_TOO_SMALL when the buffer passed is too small
svn path=/branches/aicom-network-fixes/; revision=35358
Cameron Gutman [Fri, 15 Aug 2008 18:14:55 +0000 (18:14 +0000)]
- Fix a typo resulting in any call to AfdGetSockOrPeerName with Local set to FALSE to return STATUS_NO_MEMORY
svn path=/branches/aicom-network-fixes/; revision=35356
Cameron Gutman [Thu, 14 Aug 2008 17:13:11 +0000 (17:13 +0000)]
- Fix a possible crash
- Fix 2 memory leaks
svn path=/branches/aicom-network-fixes/; revision=35343
Cameron Gutman [Thu, 14 Aug 2008 15:14:32 +0000 (15:14 +0000)]
- Always set Irp->IoStatus.Status
- Clear the cancel routine only when completing
svn path=/branches/aicom-network-fixes/; revision=35340
Cameron Gutman [Wed, 13 Aug 2008 22:33:48 +0000 (22:33 +0000)]
- Handle STATUS_BUFFER_TOO_SMALL
- Handle STATUS_NO_MEMORY
svn path=/branches/aicom-network-fixes/; revision=35320
Cameron Gutman [Wed, 13 Aug 2008 14:53:22 +0000 (14:53 +0000)]
- Set Buf to NULL so we don't try to free it again later
svn path=/branches/aicom-network-fixes/; revision=35306
Cameron Gutman [Wed, 13 Aug 2008 04:40:39 +0000 (04:40 +0000)]
- Revert r35279 due to some odd problems with UnlockBuffers when completing
svn path=/branches/aicom-network-fixes/; revision=35298