]> The Tcpdump Group git mirrors - libpcap/commitdiff
Treat ERROR_DEVICE_REMOVED as "device was removed" as well.
authorGuy Harris <[email protected]>
Mon, 8 Feb 2021 09:16:19 +0000 (01:16 -0800)
committerGuy Harris <[email protected]>
Mon, 8 Feb 2021 21:16:33 +0000 (13:16 -0800)
The Npcap driveer can apparently return either STATUS_UNSUCCESSFUL (maps
to ERROR_GEN_FAILURE) or STATUS_DEVICE_REMOVED (maps to
ERROR_DEVICE_REMOVED) for disappearing devices.

Report both as "The interface disappeared (error code XXX)", with XXX
being the Windows error code, so that the two cases can be distinguished
from one another.

We can just remove that once Npcap reports STATUS_DEVICE_REMOVED only
for cases where a physical device is removed from the system, if
possible (doing so may depend on the way the Windows networking stack
works, and it might not work in a way that makes that easy), and where
the other cases are fixed to the maximum possible extent.

(cherry picked from commit a7a9a1cbb96a649a52f6f9c2396549f38ced7bbe)


No differences found