Skip to content

security-group: compare IPv6 ranges numerically - #35

Open
tllovesxs wants to merge 1 commit into
ZSvirt:mainfrom
tllovesxs:codex/fix-ipv6-security-group-range
Open

tllovesxs wants to merge 1 commit into
ZSvirt:mainfrom
tllovesxs:codex/fix-ipv6-security-group-range

Conversation

@tllovesxs

Copy link
Copy Markdown
Contributor

Summary

  • Replace lexicographical IPv6 range ordering with numeric address comparison.
  • Preserve the existing IPv4 validation path.

Fixes #30.

Test plan

  • git diff --check
  • Verify that 2001:db8::2-2001:db8::10 is accepted by numeric range validation.
  • Verify that reversed IPv6 ranges are rejected.
  • The full security-group integration suite requires the project test environment and was not run locally.

Copilot AI lite review requested due to automatic review settings September 11, 2026 05:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@zsphere-opensource

Copy link
Copy Markdown
Contributor

Could you add regression tests for this validation path?

Please cover at least:

  • valid range: 2001:db8::2-2001:db8::10
  • reversed range: 2001:db8::10-2001:db8::2
  • invalid IPv6 endpoints
  • compressed and expanded forms of the same IPv6 address

The fix changes the ordering semantics from lexical comparison to parsed IPv6 comparison, so these cases should verify both acceptance and rejection behavior.

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.

[ZSvirt] bug: IPv6 security-group ranges are compared lexicographically

3 participants