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

TCP checksum not set #79

Closed
fujiapple852 opened this issue May 2, 2022 · 0 comments · Fixed by #80
Closed

TCP checksum not set #79

fujiapple852 opened this issue May 2, 2022 · 0 comments · Fixed by #80
Labels
bug Something isn't working tcp
Milestone

Comments

@fujiapple852
Copy link
Owner

When sending TCP packets the checksum is not being set which results in the packets being dropped by routers.

Trippy currently uses pnet layer4 and to set the checksum we need to know both the destination and source IP address. We need to obtain the source IP address using the technique described in datalink::interfaces, but as the documentation notes:

is not guaranteed to work on each system

Later, Trippy will move to use layer3 or layer2 channels (#46) and the source interface can be chosen explicitly (#42).

Note that for UDP we deliberately do not set the checksum as, in some configurations, the checksum is used as to track the sequence number (MTR behaviour).

@fujiapple852 fujiapple852 added bug Something isn't working tcp labels May 2, 2022
@fujiapple852 fujiapple852 added this to the 0.3.0 milestone May 2, 2022
@fujiapple852 fujiapple852 self-assigned this May 2, 2022
@fujiapple852 fujiapple852 removed their assignment May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tcp
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant