From baa79379986a3ac2d3a82ae7bbb3839d3f2e439d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 15 Dec 2020 19:11:40 -0800 Subject: [PATCH] net/interfaces: return IPv6 addresses from LocalAddresses. In practice, we already provide IPv6 endpoint addresses via netcheck, and that address is likely to match a local address anyway (i.e. no NAT66). The comment at that piece of the code mentions needing to figure out a good priority ordering, but that only applies to non-active-discovery clients, who already don't do anything with IPv6 addresses. Signed-off-by: David Anderson --- net/interfaces/interfaces.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/net/interfaces/interfaces.go b/net/interfaces/interfaces.go index 1bae8948d..609cec1fc 100644 --- a/net/interfaces/interfaces.go +++ b/net/interfaces/interfaces.go @@ -94,11 +94,6 @@ func LocalAddresses() (regular, loopback []string, err error) { if !ok { continue } - if ip.Is6() { - // TODO(crawshaw): IPv6 support. - // Easy to do here, but we need good endpoint ordering logic. - continue - } // TODO(apenwarr): don't special case cgNAT. // In the general wireguard case, it might // very well be something we can route to