"The device has been removed." can happen if it has, indeed, been removed.

So only tell the user to report that as an Npcap bug if they *haven't*
removed the device.
This commit is contained in:
Guy Harris 2021-02-08 00:40:36 -08:00
parent 27cbb68525
commit d28021cacb
1 changed files with 4 additions and 2 deletions

View File

@ -4153,7 +4153,8 @@ capture_loop_start(capture_options *capture_opts, gboolean *stats_known, struct
On OpenBSD, you get "read: I/O error" (EIO) in the same case.
With WinPcap and Npcap, you'll get
"read error: PacketReceivePacket failed".
"read error: PacketReceivePacket failed" or
"PacketReceivePacket error: The device has been removed. (1617)".
Newer versions of libpcap map some or all of those to just
"The interface disappeared".
@ -4196,7 +4197,8 @@ capture_loop_start(capture_options *capture_opts, gboolean *stats_known, struct
report_capture_error(cap_err_str,
"The network adapter on which the capture was being done "
"is no longer attached; the capture has stopped.\n\n"
"This may be a bug in Npcap: please report it "
"If you have not removed that adapter, "
"this may be a bug in Npcap: please report it "
"as an issue at https://github.com/nmap/npcap/issues");
} else if (strcmp(cap_err_str, "The other host terminated the connection") == 0) {
report_capture_error(cap_err_str,