Open fyodor opened 2 months ago
Since wpcap.dll code is 100% Libpcap, we need to work with them on a fix.
Unless packet.dll is doing WinSock stuff, which it doesn't appear to be doing, this is probably completely a libpcap issue; you probably can't just move this issue to our repository (as they belong to different top-level projects), and you may not want to do so anyway in order to track the fix getting into Npcap, but you should file a libpcap issue giving the above information.
Thanks @guyharris. We always appreciate your support! I just created libpcap#1333 and we will update it as we discover more in our own testing/debugging of the issue.
We did have one issue in Packet.dll due to not calling WSACleanup(). Replacing the few WinSock utility functions we had been using with equivalent ntdll or UCRT functions was sufficient to resolve the issue. There is still a problem with wpcap.dll, so I'll put my notes on that upstream issue.
We did have one issue in Packet.dll due to not calling WSACleanup().
What issue was that?
Correction: Application Verifier issued Stop ID WSA_NOT_INITIALIZED
due to Packet.dll calling getaddrinfo()
without calling WSAStartup()
first. The fix in 79e42f191143d4d895899158c576d0ac71afb290 removes all WinSock functions, and WSAStartup()
is not present.
One of our Npcap OEM redistribution customers reported:
They are using Npcap 1.79 and sent us some sample code to reproduce. Since wpcap.dll code is 100% Libpcap, we need to work with them on a fix. We upgraded to Libpcap 1.10.4 in Npcap Version 1.74. The two stops are probably related and likely related to the order of calls to WSAStartup() and WSACleanup().