diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-06-30 19:29:21 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-07-01 02:30:57 +0000 |
commit | 8a4ce74ac9a3be8c752c1b405349d6083f76e657 (patch) | |
tree | 3075a9023c5365a97b262ab963bf6344d4a07262 /dumpcap.c | |
parent | 93079941f1a4689105117449f7f1cc6413705a08 (diff) |
Libpcap may now say "The interface disappeared" if it did.
A recent change to libpcap means that the error message if an interface
disappears (e.g., removing a hot-pluggable device, or shutting down a
PPP connection that was dynamically set up) is "The interface
disappeared" rather than "The interface went down" - on FreeBSD,
DragonFly BSD, OpenBSD, and Darwin-based OSes, capturing continues with
no error if the interface is configured down, but either ENXIO or EIO
(depending on the OS) is delivered if the interface disappears.
Treat that error as another one to show the user without the "report
this to the Wireshark developers" note.
Change-Id: I477d87957ce30a52385f07f4b47a7824e3fca2c7
Reviewed-on: https://code.wireshark.org/review/33790
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'dumpcap.c')
-rw-r--r-- | dumpcap.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4062,13 +4062,14 @@ capture_loop_start(capture_options *capture_opts, gboolean *stats_known, struct "read error: PacketReceivePacket failed". Newer versions of libpcap map some or all of those to just - "The interface went down". + "The interface went down" or "The interface disappeared". These should *not* be reported to the Wireshark developers. */ char *cap_err_str; cap_err_str = pcap_geterr(pcap_src->pcap_h); if (strcmp(cap_err_str, "The interface went down") == 0 || + strcmp(cap_err_str, "The interface disappeared") == 0 || strcmp(cap_err_str, "recvfrom: Network is down") == 0 || strcmp(cap_err_str, "read: Device not configured") == 0 || strcmp(cap_err_str, "read: I/O error") == 0 || |