You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I stumbled on something strange when using sniff() and receiving IP packets with len>1600: sniff() was returning packets trimmed to 1600. By digging a bit I see that when using sniff() with custom filterthat line forces the tcpdump snaplen to 1600.
How to reproduce
Sniffing part
#!/usr/bin/env pythonfromscapy.allimportsnifffromscapy.layers.inetimportIPp=sniff(count=1, filter="host 127.0.0.1 and port 1337")[0]
print"IP.len: %d, packet len: %d"% (p[IP].len, len(p))
Hi,
I stumbled on something strange when using
sniff()
and receiving IP packets with len>1600:sniff()
was returning packets trimmed to 1600. By digging a bit I see that when usingsniff()
with customfilter
that line forces the tcpdump snaplen to 1600.How to reproduce
Sniffing part
Sending part
First script will give:
IP.len: 5040, packet len: 1600
Fixing
My quick patch is using already existing variable MTU:
Cheers dans la casa,
--
Mathieu
The text was updated successfully, but these errors were encountered: