Skip to content

opts: preserve IPv6 zones in TCP addresses - #7434

Open
sairex53 wants to merge 1 commit into
docker:masterfrom
sairex53:codex/issue-7432-ipv6-zone
Open

sairex53 wants to merge 1 commit into
docker:masterfrom
sairex53:codex/issue-7432-ipv6-zone

Conversation

@sairex53

Copy link
Copy Markdown

Summary

url.Parse decodes the %25 that introduces an IPv6 zone, so ParseTCPAddr returned an invalid URL for link-local daemon addresses. Keep the zone escaped in the URL result, and convert it back to raw %zone syntax when Swarm returns a listen address to Go's networking APIs.

Fixes #7432.

Testing

  • ./scripts/with-go-mod.sh go test ./opts ./cli/command/swarm -count=1
  • Full unit suite across 90 packages
  • ./scripts/with-go-mod.sh go vet ./opts ./cli/command/swarm
  • git diff --check

Implementation and regression tests were prepared with Codex assistance.

Signed-off-by: Eduard Zateev <hackerowskiy@gmail.com>
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.

ParseTCPAddr drops the %25 escape on IPv6 zones, so -H can't reach a link-local daemon

1 participant