From: Guy Harris Date: Sat, 5 Jan 2019 21:51:20 +0000 (-0800) Subject: Do the same tests for "not supported" SIOCGIFMEDIA as is done elsewhere. X-Git-Tag: libpcap-1.10-bp~691 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/0853992857112d8a1dbc4deae22c488a155eb73b?ds=sidebyside Do the same tests for "not supported" SIOCGIFMEDIA as is done elsewhere. --- diff --git a/pcap-bpf.c b/pcap-bpf.c index 3ad7fafb..167c5379 100644 --- a/pcap-bpf.c +++ b/pcap-bpf.c @@ -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);