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

Add IPv6 support #77

Open
pznamensky opened this issue Jul 17, 2017 · 5 comments
Open

Add IPv6 support #77

pznamensky opened this issue Jul 17, 2017 · 5 comments

Comments

@pznamensky
Copy link

It seems that mesh doesn't support IPv6 at the moment.

mesh/router.go

Line 102 in f76d3ef

localAddr, err := net.ResolveTCPAddr("tcp4", net.JoinHostPort(router.Host, fmt.Sprint(router.Port)))

We use IPv6 almost everywhere. And in the most cases we don't have any IPv4 addreses except 127.0.0.1.
I guess we are not alone with such setup.
Is it possible to add IPv6 support?

@rade
Copy link
Member

rade commented Jul 18, 2017

Is it possible to add IPv6 support?

Sure. Shouldn't be hard. PRs welcome.

@pznamensky
Copy link
Author

I'm not sure that it is the right way, but simple replacing tcp4 with tcp in net.ResolveTCPAddr(), net.ListenTCP() and net.DialTCP() does the trick.
I've tested mesh with prometheus alertmanager when servers have only IPv4 or only IPv6.
And this works as expected.
But when servers work both with IPv4 and IPv6 connections establish only using single address family.

@rade
Copy link
Member

rade commented Jul 19, 2017

But when servers work both with IPv4 and IPv6 connections establish only using single address family.

Which one? I believe the general rule is that when there is a choice, IPv6 should be used.

@pznamensky
Copy link
Author

I'm sorry for the delay.
But as far as I remember both were used.
Several times used IPv4. And several times used IPv6.

@mpalmer
Copy link
Contributor

mpalmer commented Oct 3, 2017

Since mesh peer identity isn't based on address, it shouldn't matter which address family is used to connect.

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

No branches or pull requests

3 participants