Skip to content

Use the right syntax for binding to an IPv6 address#692

Merged
gabriel-samfira merged 1 commit intocloudbase:mainfrom
Infinoid:bind-to-ipv6-addresses
Mar 27, 2026
Merged

Use the right syntax for binding to an IPv6 address#692
gabriel-samfira merged 1 commit intocloudbase:mainfrom
Infinoid:bind-to-ipv6-addresses

Conversation

@Infinoid
Copy link
Copy Markdown
Contributor

If the bind address parses as a valid IPv6 address, put it in brackets, like "[::]:9997". Without those brackets, net.Listen() will fail later on, with an error like:

listen tcp: address :::9997: too many colons in address

Fixes: #691

If the bind address parses as a valid IPv6 address, put it in brackets, like
"[::]:9997".  Without those brackets, net.Listen() will fail later on, with an
error like:

> listen tcp: address :::9997: too many colons in address

Fixes: cloudbase#691
@gabriel-samfira gabriel-samfira merged commit c0605ed into cloudbase:main Mar 27, 2026
4 checks passed
@gabriel-samfira
Copy link
Copy Markdown
Member

Thanks!

@Infinoid Infinoid deleted the bind-to-ipv6-addresses branch March 27, 2026 19:07
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.

Cannot bind to IPv6 "::" address

2 participants