]> The Tcpdump Group git mirrors - libpcap/commitdiff
Do the same tests for "not supported" SIOCGIFMEDIA as is done elsewhere.
authorGuy Harris <[email protected]>
Sat, 5 Jan 2019 21:51:20 +0000 (13:51 -0800)
committerGuy Harris <[email protected]>
Sat, 5 Jan 2019 21:51:20 +0000 (13:51 -0800)
pcap-bpf.c

index 3ad7fafb986e6ce9b3534e4bbb69f1c239d6b4cc..167c53798073a4d07d41ef8bf2a1ae1c0daf731e 100644 (file)
@@ -2898,9 +2898,15 @@ monitor_mode(pcap_t *p, int set)
                        close(sock);
                        return (PCAP_ERROR_NO_SUCH_DEVICE);
 
+               case EOPNOTUSPP:
                case EINVAL:
+               case ENOTTY:
+               case ENODEV:
+               case EPERM:
                        /*
                         * Interface doesn't support SIOC{G,S}IFMEDIA.
+                        * (See above comment for why EPERM is interpreted
+                        * as meaning "not supported".)
                         */
                        close(sock);
                        return (PCAP_ERROR_RFMON_NOTSUP);