|
|
824b43d |
commit 02096148c9c407502697cfefbc0aed50eb820bbd
|
|
|
824b43d |
Author: andy-1 <andy-1@sourceforge.net>
|
|
|
824b43d |
Date: Tue Apr 27 23:33:23 2010 -0700
|
|
|
824b43d |
|
|
|
824b43d |
Ignore /sys/net/dev files if we get ENODEV for them, not just ENXIO.
|
|
|
824b43d |
|
|
|
824b43d |
Both of them are indications that there's no such interface, so the file
|
|
|
824b43d |
probably corresponds to something other than a device.
|
|
|
824b43d |
|
|
|
824b43d |
Reviewed-By: Guy Harris <guy@alum.mit.edu>
|
|
|
824b43d |
|
|
|
824b43d |
diff --git a/CREDITS b/CREDITS
|
|
|
824b43d |
index 0d23783..6efc188 100644
|
|
|
824b43d |
--- a/CREDITS
|
|
|
824b43d |
+++ b/CREDITS
|
|
|
824b43d |
@@ -15,6 +15,7 @@ Additional people who have contributed patches:
|
|
|
824b43d |
Alexey Kuznetsov <kuznet at ms2 dot inr dot ac dot ru>
|
|
|
824b43d |
Alon Bar-Lev <alonbl at sourceforge dot net>
|
|
|
824b43d |
Andrew Brown <atatat at atatdot dot net>
|
|
|
824b43d |
+ <andy-1 at sourceforge dot net>
|
|
|
824b43d |
Antti Kantee <pooka at netbsd dot org>
|
|
|
824b43d |
Arien Vijn <arienvijn at sourceforge dot net>
|
|
|
824b43d |
Arkadiusz Miskiewicz <misiek at pld dot org dot pl>
|
|
|
824b43d |
diff --git a/pcap-linux.c b/pcap-linux.c
|
|
|
824b43d |
index af12543..de3239a 100644
|
|
|
824b43d |
--- a/pcap-linux.c
|
|
|
824b43d |
+++ b/pcap-linux.c
|
|
|
824b43d |
@@ -1883,7 +1883,7 @@ scan_sys_class_net(pcap_if_t **devlistp, char *errbuf)
|
|
|
824b43d |
*/
|
|
|
824b43d |
strncpy(ifrflags.ifr_name, name, sizeof(ifrflags.ifr_name));
|
|
|
824b43d |
if (ioctl(fd, SIOCGIFFLAGS, (char *)&ifrflags) < 0) {
|
|
|
824b43d |
- if (errno == ENXIO)
|
|
|
824b43d |
+ if (errno == ENXIO || errno == ENODEV)
|
|
|
824b43d |
continue;
|
|
|
824b43d |
(void)snprintf(errbuf, PCAP_ERRBUF_SIZE,
|
|
|
824b43d |
"SIOCGIFFLAGS: %.*s: %s",
|