Skip to content

proxy address format is not IPv6 compatible #5460

Closed
@seeder

Description

@seeder

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

Activity

added
type/bugFeature does not function as expected
good first issueA well-defined bug or improvement with sufficient context which should be approachable for new contr
theme/connectAnything related to Consul Connect, Service Mesh, Side Car Proxies
on Mar 11, 2019
seeder

seeder commented on May 8, 2019

@seeder
Author

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

added a commit that references this issue on May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueA well-defined bug or improvement with sufficient context which should be approachable for new contrtheme/connectAnything related to Consul Connect, Service Mesh, Side Car Proxiestype/bugFeature does not function as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @mkeeler@seeder

      Issue actions

        proxy address format is not IPv6 compatible · Issue #5460 · hashicorp/consul