mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 19:51:41 +00:00
net/interfaces: log why when we failed to look up gateway on macOS
Not beautiful, but I'm debugging connectivity problems on NEProvider.sleep+wake and need more clues. Updates #1426 Updates tailscale/corp#1289 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
affd859121
commit
b14ea68754
@ -105,6 +105,7 @@ import "C"
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
"log"
|
||||||
|
|
||||||
"inet.af/netaddr"
|
"inet.af/netaddr"
|
||||||
)
|
)
|
||||||
@ -116,6 +117,7 @@ func init() {
|
|||||||
func likelyHomeRouterIPDarwinSyscall() (ret netaddr.IP, ok bool) {
|
func likelyHomeRouterIPDarwinSyscall() (ret netaddr.IP, ok bool) {
|
||||||
ip := C.privateGatewayIP()
|
ip := C.privateGatewayIP()
|
||||||
if ip < 255 {
|
if ip < 255 {
|
||||||
|
log.Printf("likelyHomeRouterIPDarwinSyscall: error code %v", ip)
|
||||||
return netaddr.IP{}, false
|
return netaddr.IP{}, false
|
||||||
}
|
}
|
||||||
var q [4]byte
|
var q [4]byte
|
||||||
|
Loading…
x
Reference in New Issue
Block a user