aboutsummaryrefslogtreecommitdiffstats
path: root/pcap-linux.c
diff options
context:
space:
mode:
authorandy-1 <andy-1@sourceforge.net>2010-04-27 23:33:23 -0700
committerGuy Harris <guy@alum.mit.edu>2010-04-27 23:33:23 -0700
commit073a8b37f97b684a34d29800400879e4e902ff63 (patch)
treeb511c3f867a38f79e95aae15cebd246ed178ba45 /pcap-linux.c
parentace1a2c86f54529dac7f3db51c2d914826126fff (diff)
Ignore /sys/net/dev files if we get ENODEV for them, not just ENXIO.
Both of them are indications that there's no such interface, so the file probably corresponds to something other than a device. Reviewed-By: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'pcap-linux.c')
-rw-r--r--pcap-linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pcap-linux.c b/pcap-linux.c
index af12543..de3239a 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -1883,7 +1883,7 @@ scan_sys_class_net(pcap_if_t **devlistp, char *errbuf)
*/
strncpy(ifrflags.ifr_name, name, sizeof(ifrflags.ifr_name));
if (ioctl(fd, SIOCGIFFLAGS, (char *)&ifrflags) < 0) {
- if (errno == ENXIO)
+ if (errno == ENXIO || errno == ENODEV)
continue;
(void)snprintf(errbuf, PCAP_ERRBUF_SIZE,
"SIOCGIFFLAGS: %.*s: %s",