diff options
Diffstat (limited to 'pcap-npf.c')
-rw-r--r-- | pcap-npf.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -1222,10 +1222,14 @@ pcap_activate_npf(pcap_t *p) NDIS_PACKET_TYPE_BROADCAST | NDIS_PACKET_TYPE_MULTICAST) == FALSE) { - pcap_fmt_errmsg_for_win32_err(p->errbuf, - PCAP_ERRBUF_SIZE, GetLastError(), - "failed to set hardware filter to non-promiscuous mode"); - goto bad; + /* suppress spurious error generated by noncompiant MS Surface mobile adaptors */ + if (GetLastError() != NPF_SURFACE_MOBILE_NONPROMISC) + { + pcap_fmt_errmsg_for_win32_err(p->errbuf, + PCAP_ERRBUF_SIZE, GetLastError(), + "failed to set hardware filter to non-promiscuous mode"); + goto bad; + } } } |