Brad Fitzpatrick
aaf2df7ab1
net/{dnscache,interfaces}: use netaddr.IP.IsPrivate, delete copied code
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
5 years ago
Denton Gentry
09148c07ba
interfaces: check correct error /proc/net/route
...
wrap io.EOF if we hit https://github.com/google/gvisor/issues/5732
Check for the correct err.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
5 years ago
Denton Gentry
a9745a0b68
interfaces: try larger read from /proc/net/route
...
Work around https://github.com/google/gvisor/issues/5732
by trying to read /proc/net/route with a larger bufsize if
it fails the first time.
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
5 years ago
Brad Fitzpatrick
25b021388b
net/netns, net/interfaces: move defaultRouteInterface, add Android fallback
...
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
6 years ago
Brad Fitzpatrick
33a748bec1
net/interfaces: fix likelyHomeRouterIP on Android
6 years ago
Brad Fitzpatrick
32156330a8
net/interfaces: add func LikelyHomeRouterIP
...
For discovering where we might direct NAT-PMP/PCP/UPnP queries at in
the future.
6 years ago