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

Use canonical string representation for IPv6 addresses #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dev-aaront-org
Copy link
Contributor

Net::IP::ip returns the expanded representation for IPv6 addresses (from ip_expand_address), whereas Net::IP::short returns the compressed representation (from ip_compress_address) recommended by RFC 5952. Per section 4, "The recommendation in this section SHOULD be followed by systems when generating an address to be represented as text."[1]

Net::IP::ip and Net::IP::short return the same value for single IPv4 addresses, however they may return different values for IPv4 prefixes. The code affected by this change only deals with single addresses so there is no change to the representation of IPv4 addresses.

[1] https://datatracker.ietf.org/doc/html/rfc5952#section-4

Net::IP::ip returns the expanded representation for IPv6 addresses (from
ip_expand_address), whereas Net::IP::short returns the compressed
representation (from ip_compress_address) recommended by RFC 5952. Per
section 4, "The recommendation in this section SHOULD be followed by
systems when generating an address to be represented as text."[1]

Net::IP::ip and Net::IP::short return the same value for single IPv4
addresses, however they may return different values for IPv4 prefixes.
The code affected by this change only deals with single addresses so
there is no change to the representation of IPv4 addresses.

[1] https://datatracker.ietf.org/doc/html/rfc5952#section-4
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.

1 participant