Skip to content

Conversation

@bondehagen
Copy link
Contributor

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
Contributor 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
@bondehagen bondehagen force-pushed the ipv6-zero-runs-compression branch from 4a766b4 to 2d377f5 Compare February 5, 2025 22:43
@bondehagen bondehagen force-pushed the ipv6-zero-runs-compression branch from 2d377f5 to 325e017 Compare February 6, 2025 11:19
@bondehagen
Copy link
Contributor Author

@MatthiasPortzel Would it be possible for you to take a look again?

@MatthiasPortzel
Copy link

Nothing else that jumps out at me, but I’m not the one you need to ask. I’m unaffiliated with Zig, I was just making a suggestion. I know the core team is busy reviewing PRs ahead of the 0.14 release so I would just wait at this point.

Copy link
Member

@andrewrk andrewrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, thank you

@andrewrk andrewrk merged commit 7700744 into ziglang:master Feb 23, 2025
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.

4 participants