Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxy address format is not IPv6 compatible #5460

Closed
seeder opened this issue Mar 10, 2019 · 1 comment · Fixed by #5468
Closed

proxy address format is not IPv6 compatible #5460

seeder opened this issue Mar 10, 2019 · 1 comment · Fixed by #5468
Labels
good first issue A well-defined bug or improvement with sufficient context which should be approachable for new contr theme/connect Anything related to Consul Connect, Service Mesh, Side Car Proxies type/bug Feature does not function as expected

Comments

@seeder
Copy link

seeder commented Mar 10, 2019

Overview of the Issue

consul connect proxy public address is not escaped correctly for IPv6 addresses when making connection to upstream.

There is a Sprintf in https://github.com/hashicorp/consul/blob/master/connect/proxy/config.go which doesn't take into account a proper format for IPv6 addresses ( line 116 )

Reproduction Steps

Steps to reproduce this issue, eg:

  1. start a connect proxy for a service, make the proxy register listen under IPv6 address consul connect proxy -service postgres -service-addr 172.17.0.3:5432 -listen [fc01::1]:15432 -register
  2. start a connect proxy upstream to access the service consul connect proxy -service web -upstream postgres:5432
  3. View error on the proxy which is trying to establish connect (web side)
[ERR] failed to dial: dial tcp: address fc01::1:15432: too many colons in address

Consul info for both Client and Server

Client info
 consul info
agent:   
        check_monitors = 0
        check_ttls = 2
        checks = 5
        services = 5
build:   
        prerelease =
        revision = c97c712e
        version = 1.4.2

Server info
 consul info
agent:   
        check_monitors = 0
        check_ttls = 2
        checks = 5
        services = 5
build:   
        prerelease =
        revision = c97c712e
        version = 1.4.2

Operating system and Environment details

Ubuntu 18.04

@mkeeler mkeeler added type/bug Feature does not function as expected good first issue A well-defined bug or improvement with sufficient context which should be approachable for new contr theme/connect Anything related to Consul Connect, Service Mesh, Side Car Proxies labels Mar 11, 2019
@seeder
Copy link
Author

seeder commented May 8, 2019

is there any chance that this patch gets merged?

looks like it was an easy fix, but there is no will to actually close this blocker bug

pierresouchay added a commit to pierresouchay/consul that referenced this issue May 10, 2019
Ensure that when we format address:port if the address is IPv6, we
format it using "[%s]:%d" instead of "%s:%d".

This should fix hashicorp#5460
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A well-defined bug or improvement with sufficient context which should be approachable for new contr theme/connect Anything related to Consul Connect, Service Mesh, Side Car Proxies type/bug Feature does not function as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants