These "weird" port lines show up in logs frequently.
They're the result of uninteresting races,
and they're not actionable. Remove the noise.
Remove the isLoopbackAddr case to placate staticcheck.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Prior to Go 1.16, iOS used GOOS=darwin,
so we had to distinguish macOS from iOS during GOARCH.
We now require Go 1.16 in our go.mod, so we can simplify.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Build tags have been updated to build native Apple M1 binaries, existing build
tags for ios have been changed from darwin,arm64 to ios,arm64.
With this change, running go build cmd/tailscale{,d}/tailscale{,d}.go on an Apple
machine with the new processor works and resulting binaries show the expected
architecture, e.g. tailscale: Mach-O 64-bit executable arm64.
Tested using go version go1.16beta1 darwin/arm64.
Updates #943
Signed-off-by: moncho <50428+moncho@users.noreply.github.com>
Running tailscaled on my machine yields lots of entries like:
weird: missing {tcp 6060}
parsePortsNetstat is filtering out loopback addresses as uninteresting.
Then addProcesses is surprised to discover these listening ports,
which results in spurious logging.
Teach addProcesses to also ignore loopback addresses.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This gives us 90KB more of memory on iOS, as it shrinks the
NetworkExtension binary by 90KB.
The netstat binary isn't available in the network extension anyway, so
no point pulling in the osexec package which'll just fail to find
netstat anyway.