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

Store ports in sockaddr_in structure in network byte order #1

Merged

Conversation

coledishington
Copy link
Contributor

The structure sockaddr_in from netinet/in.h of stdlib declears that sin_port should be in network byte order.

Switch from using host byte order to network byte order for the ports stored in the InetTuple.sockaddr_in.sin_port.

Switch unit tests to expecting network byte order ports and use a non-symmetric test port to ensure byte order errors are detected.

The structure sockaddr_in from netinet/in.h of stdlib declears
that sin_port should be in network byte order.

Switch from using host byte order to network byte order for the
ports stored in the InetTuple.sockaddr_in.sin_port.

Switch unit tests to expecting network byte order ports and use a
non-symmetric test port to ensure byte order errors are detected.
@carlatat carlatat merged commit 1d2b8a4 into Active-Telemetry:master Jun 19, 2024
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