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

std.net: Fix IPv6 address format compression for long zero runs #22441

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bondehagen
Copy link

Fixes a bug in Ip6Address.format where improper zero-run handling led to incorrect IPv6 compression.

This PR fixes #22440.

@bondehagen bondehagen force-pushed the ipv6-zero-runs-compression branch from 7c2b944 to 70542a0 Compare January 7, 2025 11:27
@bondehagen bondehagen force-pushed the ipv6-zero-runs-compression branch 2 times, most recently from 579b709 to 591e41b Compare January 11, 2025 14:23
@mlugg
Copy link
Member

mlugg commented Jan 12, 2025

The obvious issue with your implementation is that it doesn't work on big-endian hosts. This logic should not be attached to the endianness conversion.

@bondehagen bondehagen force-pushed the ipv6-zero-runs-compression branch 2 times, most recently from 2f5d5a6 to 249a1a5 Compare January 16, 2025 22:17
@bondehagen
Copy link
Author

bondehagen commented Jan 16, 2025

The obvious issue with your implementation is that it doesn't work on big-endian hosts. This logic should not be attached to the endianness conversion.

@mlugg Ups, moved to separate loop now

@bondehagen bondehagen force-pushed the ipv6-zero-runs-compression branch from 249a1a5 to dc0e56a Compare January 16, 2025 22:20
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.

Error when shortening ipv6 adresses with long zero runs.
3 participants