Fix Docker IPv6 route discovery for IPAM networks - #575
Merged
Conversation
Prefer IPv4 and fall back to GlobalIPv6Address when parsing Docker endpoint settings so IPv6-only/IPAM-assigned containers are routable. Also normalize Docker backend endpoint construction with net.JoinHostPort to produce valid host:port strings for IPv6. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docker-discovered routes were skipped when a container only exposed an IPv6 address, because discovery only read
endpoint.IPAddress(IPv4). This broke discoverability for IPv6-only and IPAM-assigned IPv6 container setups.This change updates Docker parsing to prefer IPv4 when present and fall back to
GlobalIPv6Addresswhen IPv4 is empty. It also switches Docker backend endpoint construction tonet.JoinHostPortso IPv6 backends are always formatted correctly as[addr]:port.Tests
server/docker_test.gowith coverage for:go test ./server -count=1Fixes: #574