Skip to content

Fix generated config when binding to IPv6 addresses#227

Merged
TheMeier merged 2 commits intovoxpupuli:masterfrom
icann-dns:http_port_ipv6
Oct 18, 2025
Merged

Fix generated config when binding to IPv6 addresses#227
TheMeier merged 2 commits intovoxpupuli:masterfrom
icann-dns:http_port_ipv6

Conversation

@b4ldr
Copy link
Copy Markdown
Member

@b4ldr b4ldr commented Oct 7, 2025

When using an ipv6 address in the host we need to wrap the addresses with square brackets.

When using an ipv6 address in the host we need to wrap the addresses win
square brackets.
@b4ldr b4ldr requested a review from Copilot October 8, 2025 11:42
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for IPv6 addresses in the HTTP port configuration by wrapping IPv6 addresses in square brackets, following the standard format for IPv6 addresses in URLs and host:port combinations.

  • Refactored the host:port string construction logic to use a conditional expression instead of if-else blocks
  • Added IPv6 address detection using Stdlib::IP::Address::V6 type checking
  • IPv6 addresses are now properly wrapped in square brackets when combined with port numbers

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
manifests/http_port.pp Implements IPv6 address detection and wrapping logic using conditional expression
spec/defines/http_port_spec.rb Adds test case to verify IPv6 addresses are properly wrapped in square brackets

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@smortex smortex changed the title http_port: Add support for IPv6 addresses Fix generated config when binding to IPv6 addresses Oct 8, 2025
@smortex smortex added the bug Something isn't working label Oct 8, 2025
@TheMeier TheMeier merged commit 4e60b0d into voxpupuli:master Oct 18, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants