-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't limit the snaplen by default #155
Comments
Seems that we cannot rely on the MTU value. Virtual interfaces seem to send arbitrary sized packets, the only limit seems to be 64K. We should still be able to find a reliable way of knowing if an interval is virtual or not. |
The two possible solutions I see:
The second solution makes for an optimized snaplen, but it's clearly more complex and has the disadvantage that we still lose data on each first "bigger" packet. It's also impossible to predict when the loss will happen. It's also not clear right now if changing the snaplen on existing socket can cause any drops during the change. The good news about the first option is that libpcap doesn't seem to be affected by the snaplen change if the packets are small (~1500 bytes), so when using the pcap sniffer there isn't really a downside to just using 65535. For the Given the above, I tend to favor the first solution. |
Fix #140: Convert offest and line to long fields to prevent overflow
This is triggered by #145, where our default value for snaplen was too small for a virtual interface (
docker0
).We could "fix" it by adding docker to the list of virtual interfaces we detect by name, but it seems to me that a better approach would be to read the MTU size of the interface and set the default snaplen based on that.
The text was updated successfully, but these errors were encountered: