mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-01-08 14:36:22 +01:00
Adjust snaplen to grab the whole packet in case mtu > 1514
Fixes an issue where pcap_dispatch would return -1 and pcap_geterror said "corrupted frame on kernel ring mac" [Fixes #6527]
This commit is contained in:
parent
f9739c7ac8
commit
528e8d25d5
@ -523,6 +523,8 @@ DWORD sniffer_thread(THREAD *thread)
|
||||
select(fd+1, &rfds, NULL, NULL, &tv);
|
||||
|
||||
count = pcap_dispatch(j->pcap, 100, packet_handler, (u_char *)(j));
|
||||
if (-1 == count)
|
||||
dprintf("pcap error: %s", pcap_geterr(j->pcap));
|
||||
|
||||
if(count <= 0) continue;
|
||||
if(count) dprintf("dispatched %d packets", count);
|
||||
@ -605,7 +607,7 @@ DWORD request_sniffer_capture_start(Remote *remote, Packet *packet) {
|
||||
break;
|
||||
}
|
||||
|
||||
j->pcap = pcap_open_live(name, 1514, 1, 1000, errbuf);
|
||||
j->pcap = pcap_open_live(name, 65535, 1, 1000, errbuf);
|
||||
if(! j->pcap) {
|
||||
result = EACCES;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user