mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
Added call to pcap_can_set_rfmon before calling pcap_set_rfmon.
This commit is contained in:
@@ -206,9 +206,11 @@ pcap_open_live_extended(const char *source, int snaplen, int promisc, int to_ms,
|
||||
status = pcap_set_timeout(p, to_ms);
|
||||
if (status < 0)
|
||||
goto fail;
|
||||
status = pcap_set_rfmon(p, rfmon);
|
||||
if (status < 0)
|
||||
goto fail;
|
||||
if(pcap_can_set_rfmon(p) == 1) {
|
||||
status = pcap_set_rfmon(p, rfmon);
|
||||
if (status < 0)
|
||||
goto fail;
|
||||
}
|
||||
status = pcap_activate(p);
|
||||
if (status < 0)
|
||||
goto fail;
|
||||
|
||||
Reference in New Issue
Block a user