Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Prefer IPv4 over IPv6 in Select Address functions #6338
Conversation
added some commits
Sep 27, 2016
| @@ -398,7 +412,6 @@ var selectInternalTests = []selectTest{{ | ||
| network.NewScopedAddress("2001:db8::1", network.ScopePublic), | ||
| network.NewScopedAddress("fc00::1", network.ScopeCloudLocal), | ||
| network.NewScopedAddress("8.8.8.8", network.ScopePublic), | ||
| - network.NewScopedAddress("10.0.0.1", network.ScopeCloudLocal), |
voidspace
Sep 28, 2016
Because otherwise it is selected in preference to the IPv6 one and its presence isn't relevant to that specific test.
| @@ -407,7 +420,6 @@ var selectInternalTests = []selectTest{{ | ||
| network.NewScopedAddress("8.8.8.8", network.ScopePublic), | ||
| network.NewScopedAddress("2001:db8::1", network.ScopePublic), | ||
| network.NewScopedAddress("fc00::1", network.ScopeCloudLocal), | ||
| - network.NewScopedAddress("10.0.0.1", network.ScopeCloudLocal), |
| @@ -458,9 +478,19 @@ var selectInternalMachineTests = []selectTest{{ | ||
| network.NewScopedAddress("fe80::1", network.ScopeLinkLocal), | ||
| network.NewScopedAddress("127.0.0.2", network.ScopeMachineLocal), | ||
| }, | ||
| + 4, | ||
| +}, { | ||
| + "first machine local non-IPv4 address is selected even with public/cloud hostnames", |
dimitern
Sep 28, 2016
Contributor
There are no IPv4 local-machine addresses here, so either the comment is wrong or something else?
voidspace
Sep 28, 2016
There has to be no IPv4 addresses or they will be selected in preference - hence this is a test for "non IPv4 address" selection.
voidspace
commented
Sep 28, 2016
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
|
Build failed: Tests failed |
voidspace
commented
Sep 29, 2016
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
added some commits
Sep 29, 2016
|
Build failed: Tests failed |
voidspace
commented
Sep 29, 2016
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit 8f7ead3
into
juju:master
Sep 29, 2016
voidspace
deleted the
voidspace:preferred-address-ipv6
branch
Oct 6, 2016
frobware
referenced this pull request
Oct 12, 2016
Merged
lxd: disable ipv6 when creating a new-style bridge #6430
|
For reference this fixed: https://launchpad.net/bugs/1624495 |
voidspace commentedSep 28, 2016
Prefer IPv4 addresses over IPv6 or hostnames in the select address functions. This means that unit dns-name (which comes from machine preferred public address) will always be an IPv4 address if one is available.
QA
Bootstrap to lxd.
Deploy ubuntu to >10 machines.
All machines should have IPv4 addresses rather than IPv6 ones.