From: Guy Harris Date: Tue, 1 May 2018 06:51:28 +0000 (-0700) Subject: Either EOPNOTSUPP or EINVAL mean "that ioctl isn't supported". X-Git-Tag: libpcap-1.9-bp~63 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/04d16d0c49837eaae2cb5d839c311a9291d7d604 Either EOPNOTSUPP or EINVAL mean "that ioctl isn't supported". --- diff --git a/pcap-bpf.c b/pcap-bpf.c index 5b884caa..65dc9ed2 100644 --- a/pcap-bpf.c +++ b/pcap-bpf.c @@ -2747,7 +2747,7 @@ get_if_flags(const char *name, bpf_u_int32 *flags, char *errbuf) memset(&req, 0, sizeof(req)); strncpy(req.ifm_name, name, sizeof(req.ifm_name)); if (ioctl(sock, SIOCGIFMEDIA, &req) < 0) { - if (errno == EOPNOTSUPP) { + if (errno == EOPNOTSUPP || errno == EINVAL) { /* * Not supported, so we can't provide any * additional information. Assume that