Skip to content
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

PackHexLine fails reading odd length packets #1

Open
mills95 opened this issue Dec 6, 2024 · 0 comments · May be fixed by #2
Open

PackHexLine fails reading odd length packets #1

mills95 opened this issue Dec 6, 2024 · 0 comments · May be fixed by #2

Comments

@mills95
Copy link

mills95 commented Dec 6, 2024

TcpdumpEventParser::PackHexLine only parses 16-bit tuples and a packet with an odd number of bytes causes TcpdumpEventParser::GetNextPacketEvent to get out of alignment and read the next line as if it were part of the hex line resulting in a skipped packet.

Also in TcpdumpEventParser::GetNextPacketEvent, timestamp seconds are read as floats but cast to double when generating theTime. This is not a bug, but should just read as double to prevent out-of-order packets due to floating point conversion/rounding (also better when using tcpdump --nano option).

@mills95 mills95 linked a pull request Dec 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant