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

Update header unpack formatting to fix ICMPv6 requests #26

Merged

Conversation

dkaplan1
Copy link

@dkaplan1 dkaplan1 commented Jun 3, 2022

The current header struct format bbHHh will cause ICMPv6 response types to be interpreted wrong, which results in a timeout. Since ICMP6_ECHO_REPLY = 129

ICMP6_ECHO_REPLY = 129
we need to unpack the type as unsigned (ref) or else the type will never match (129 vs -127)
if type != ICMP_ECHO_REPLY and type != ICMP6_ECHO_REPLY:
.

@anton-belousov anton-belousov merged commit 8a78f9d into stellarbit:master Jul 11, 2023
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 this pull request may close these issues.

2 participants