Skip to content

Backport of fix: use net.JoinHostPort for remaining Envoy admin URLs into release/1.9.x#1070

Merged
hc-github-team-consul-core merged 1 commit into
release/1.9.xfrom
backport/spulluri/fixing_bugs_dp/readily-coherent-buck
Jun 24, 2026
Merged

Backport of fix: use net.JoinHostPort for remaining Envoy admin URLs into release/1.9.x#1070
hc-github-team-consul-core merged 1 commit into
release/1.9.xfrom
backport/spulluri/fixing_bugs_dp/readily-coherent-buck

Conversation

@hc-github-team-consul-core

Copy link
Copy Markdown
Collaborator

Backport

This PR is auto-generated from #1066 to be assessed for backporting due to the inclusion of the label backport/1.9.

The below text is copied from the body of the original PR.


Description

Follow-up to #1064.

This updates the remaining Envoy admin URLs in pkg/envoy/proxy.go to use net.JoinHostPort instead of manually formatting host:port pairs.

The previous fmt.Sprintf("http://%s:%v/...") pattern is not safe for all admin bind addresses, especially IPv6 addresses. Drain() and Quit() were already updated to use net.JoinHostPort; this change applies the same fix to:

  • DumpConfig() via /config_dump?include_eds
  • Ready() via /ready

This keeps Envoy admin endpoint construction consistent across the proxy manager and avoids malformed URLs when the admin address is not a simple IPv4/hostname value.

Testing

  • Ran pkg/envoy/proxy_test.go

Overview of commits

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Auto approved Consul Bot automated PR

@hc-github-team-consul-core hc-github-team-consul-core merged commit 23ea0de into release/1.9.x Jun 24, 2026
38 checks passed
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.

3 participants