]> The Tcpdump Group git mirrors - libpcap/commitdiff
Or maybe you'll get ENOTTY for an invalid ioctl.
authorGuy Harris <[email protected]>
Tue, 1 May 2018 07:09:22 +0000 (00:09 -0700)
committerGuy Harris <[email protected]>
Tue, 1 May 2018 07:09:22 +0000 (00:09 -0700)
*BSD: a family of OSes divided by a common API.

pcap-bpf.c

index 65dc9ed20410ccc7d4ab6831275303f6674f50d9..c160e5c004ffa92e9be2da998f420a088d224fde 100644 (file)
@@ -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 || errno == EINVAL) {
+               if (errno == EOPNOTSUPP || errno == EINVAL || errno == ENOTTY) {
                        /*
                         * Not supported, so we can't provide any
                         * additional information.  Assume that