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

3.2.x issue 2048 - fix checksum validation when 0xffff - v1 #2630

Closed

Conversation

Issue:
https://redmine.openinfosecfoundation.org/issues/2041

One approach to fixing this issue to just validate the
checksum instead of regenerating it and comparing it. This
method is used in some kernels and other network tools.

When validating, the current checksum is passed in as an
initial argument which will cause the final checksum to be 0
if OK. If generating a checksum, 0 is passed and the result
is the generated checksum.
The TCP/UDP checksum functions no longer just calculate
the checksum, they can validate as well as calculate so
use a more generic name.
Update the IPv4 checksum function to be like the
changed TCP/UDP checksum functions for consistency.
@inliniac inliniac mentioned this pull request Mar 30, 2017
@inliniac
Copy link
Contributor

Merged through #2634, thanks Jason!

@inliniac inliniac closed this Mar 30, 2017
@jasonish jasonish deleted the 3.2.x-issue-2048-bad-checksum-1 branch March 30, 2017 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants