Skip to content

[NET-747] Preserve IPv4-mapped IPv6 addresses in SubnetUtils6 - #412

Open
AryanRG wants to merge 1 commit into
apache:masterfrom
AryanRG:NET-747-ipv4-mapped-subnet
Open

AryanRG wants to merge 1 commit into
apache:masterfrom
AryanRG:NET-747-ipv4-mapped-subnet

Conversation

@AryanRG

@AryanRG AryanRG commented Oct 18, 2026

Copy link
Copy Markdown

Summary

  • Preserve IPv4-mapped IPv6 literals as 16-byte addresses when parsing SubnetUtils6.
  • Format mapped subnet addresses as IPv6 so the returned addresses can be parsed and range-checked again.
  • Add regression coverage for mapped CIDRs, dotted and hexadecimal forms, round-tripping, and rejection of plain IPv4 text.

Jira: https://issues.apache.org/jira/browse/NET-747

Validation

  • New SubnetUtils6Test case: red on unmodified master (31 run, 1 error); green with this change (31 run, 0 failures/errors).
  • Default Maven goal passed on the final three-file commit with mvn -q on macOS/JDK 27. xmllint --noout src/changes/changes.xml and git diff --check passed.
  • Hosted CI is pending; no release artifact was tested.

AI assistance

Kiro with Claude Opus 5.5 assisted with the initial code and regression test. A separate Kiro review checked the exact code diff and independently reproduced the failure before and success after the fix.

Checklist

  • Read this project's contribution guidelines.
  • Read the ASF Generative Tooling Guidance.
  • Disclosed the AI tool and extent of assistance above.
  • Ran the default Maven goal successfully.
  • Added a regression test that fails without the runtime change.
  • Explained the change, reason, and validation.
  • Used a meaningful Jira-keyed commit subject and body.

Keep mapped literals as 16-byte IPv6 values when parsing and formatting. Add regression coverage for mapped CIDR ranges, round-tripping and plain IPv4 rejection.
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