- Fix one of the worst bugs in AFD of all time. Our AFD code operated under the assumption that none of the input parameters would change once we called LockRequest. This assumption is completely false. The only guarantee that made was that the pages never disappeared from us, not they they couldn't be modified. There are frequent cases where the user-mode buffer was modified from underneath us (WSPRecv allocates the struct on stack which makes it invalid during overlapped operations that complete later). When this happened, we would bugcheck when we tried to unlock the buffers since we accessed this in a member of the struct the caller passed us.
- I've fixed this by adding a parameter to LockRequest which specifies whether the buffer should be copied back when it is unlocked.
- This bug has been around for ages and I was never able to figure out why we just freed garbage sometimes. Now that the ws2_32_winetest exposed it reliably, I was finally able to fix it.
svn path=/trunk/; revision=57175
- Add support for getting and setting SO_EXCLUSIVEADDRUSE
- Add support for setting SO_REUSEADDR
[AFD]
- Implement proper TDI way of indicating a reusable address file
- More work remains in TCP/IP to support this
svn path=/trunk/; revision=57115
- Fix a nasty datagram corruption bug that would result in an uninitialized buffer data being returned instead of packet data if the client read buffer was smaller than the datagram received
- Fix broken user-mode send datagram IRP completion code which didn't set the completion status
- Implement disabling/enabling event select triggers
svn path=/trunk/; revision=52723
- Add support for AFD_INFO_INLINING_MODE
- Add support for setting AFD_INFO_RECEIVE_WINDOW_SIZE and AFD_INFO_SEND_WINDOW_SIZE
- None of this is used by our current msafd but mswsock_new uses it
svn path=/trunk/; revision=52538
- Pass the non-blocking information as a boolean (mswsock_new does this too)
[AFD]
- Don't block waiting for a connection to accept on a non-blocking listener
svn path=/trunk/; revision=52537
- Queue the user-mode connect IRP before calling TdiConnect to avoid a race if the TDI_CONNECT IRP is completed before we get a chance to queue the user-mode IRP to accept the connection
- Change the non-blocking TDI helper functions to always return STATUS_PENDING if the completion function will be called to avoid duplicate handling of IRPs
svn path=/trunk/; revision=52441
- Hold on to the disconnect IRP until all pending sending IRPs are sent to the transport driver if a controlled disconnect was requested
svn path=/trunk/; revision=52415
- Rewrite user-mode request locking to fix several bugs
- IRP_MJ_READ and IRP_MJ_WRITE doesn't crash
- Revert the IoModifyAccess change (the Write parameter was relevant to the buffer not the request)
- Use GetLockedData to retrieve a locked buffer instead of accessing it manually
- Lock several requests which were not locked and could cause a crash
- ASSERT that the in flight request is the IRP being completed
- Fix a socket closure bug so shutdown(SO_SEND) will not prevent packets being received
- Don't count bytes used in the receive content
- Don't free the datagram buffer if it is a peek request
- Requeue the datagram buffer at the head of the list if it is a peek request
- Fix a bug which could cause corrupted data to be received if multiple datagrams come in before the app receives them
- Make sure that we're not overwriting an existing in flight request when creating a new one
- Perform an implicit bind in AfdPacketSocketWriteData if it is not already bound
- Implement batching several user-mode send IRPs into one TDI request (if there is already one pending)
- Fix a potential crash if a connectionless send IRP is cancelled
svn path=/trunk/; revision=52186
- Launch a new listen IRP right after the current one completes instead of waiting until the current pending connection is accepted
- Reduces the chance of AFD missing two connection requests that are issued very close together and increases network performance by allowing our connection queue to do its job
svn path=/trunk/; revision=52013
- Remove an incorrect change
- Create a new function called TranslateNtStatusError to translate NTSTATUS to winsock error codes
- Call the TranslateNtStatusError in MsafdReturnWithErrno and also use it to translate AFD's poll event error codes
[AFD]
- Track the status for each poll event in our FCB and copy it back when we get an IOCTL_AFD_ENUM_NETWORK_EVENTS IRP
- Remove some useless PollReeval calls
svn path=/trunk/; revision=47377
New noteworthy improvements include (in addition to the other improvements made in the commits that were reverted in trunk):
- Support for sending/receiving packets > 16KB in size
- Samba-tng works
- Tracert works
- Major speed and stability improvements (especially for TCP connections)
- Use ExAllocatePoolWithTag/ExFreePoolWithTag instead of memtrack
svn path=/trunk/; revision=45172
- TSVN choked repeatedly when attempting to merge ~9000 revs into the branch (tried 3 times on 2 different computers)
- If someone wants to delete aicom-network-fixes, they are welcome to
- Lesson learned: Letting a branch get thousands of revs out of date is a horrible idea
svn path=/branches/aicom-network-branch/; revision=44353
- Add entity type check for IF_MIB_STATS_ID
- Sort out some confusion with TDI entities
- Implement IOCTL_AFD_GET_CONTEXT_SIZE
- Enable debug prints for unimplemented ioctls
- Add kernel-mode support for setting TTL
svn path=/trunk/; revision=43767
r35014 | cgutman | 2008-08-01 10:21:52 -0700 (Fri, 01 Aug 2008) | 2 lines
- These should no longer be needed now that TDI doesn't give back invalid IRPs
- I'll look into the canceling issue later
svn path=/trunk/; revision=35019
Factor out common datagram receive code.
Actually implement datagram cancellation.
afd:
Reorganize IRP cancellation and simplify socket shutdown.
Fix datagram recv with no address differently (and better).
Overall: fix hang after ping.
svn path=/trunk/; revision=30693