mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
portlist: remove some old TODOs
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
e638a4d86b
commit
b0af15ff5c
@ -25,8 +25,6 @@
|
|||||||
// Reading the sockfiles on Linux is very fast, so we can do it often.
|
// Reading the sockfiles on Linux is very fast, so we can do it often.
|
||||||
const pollInterval = 1 * time.Second
|
const pollInterval = 1 * time.Second
|
||||||
|
|
||||||
// TODO(apenwarr): Include IPv6 ports eventually.
|
|
||||||
// Right now we don't route IPv6 anyway so it's better to exclude them.
|
|
||||||
var sockfiles = []string{"/proc/net/tcp", "/proc/net/tcp6", "/proc/net/udp", "/proc/net/udp6"}
|
var sockfiles = []string{"/proc/net/tcp", "/proc/net/tcp6", "/proc/net/udp", "/proc/net/udp6"}
|
||||||
|
|
||||||
var sawProcNetPermissionErr syncs.AtomicBool
|
var sawProcNetPermissionErr syncs.AtomicBool
|
||||||
|
@ -33,8 +33,9 @@ func listPorts() (List, error) {
|
|||||||
// However, "netstat -na" runs ~100x faster than lsof on my machine, so
|
// However, "netstat -na" runs ~100x faster than lsof on my machine, so
|
||||||
// we should do it only if the list of open ports has actually changed.
|
// we should do it only if the list of open ports has actually changed.
|
||||||
//
|
//
|
||||||
// TODO(apenwarr): this fails in a macOS sandbox (ie. our usual case).
|
// This fails in a macOS sandbox (i.e. in the Mac App Store or System
|
||||||
// We might as well just delete this code if we can't find a solution.
|
// Extension GUI build), but does at least work in the
|
||||||
|
// tailscaled-on-macos mode.
|
||||||
func addProcesses(pl []Port) ([]Port, error) {
|
func addProcesses(pl []Port) ([]Port, error) {
|
||||||
if atomic.LoadInt64(&lsofFailed) != 0 {
|
if atomic.LoadInt64(&lsofFailed) != 0 {
|
||||||
// This previously failed in the macOS sandbox, so don't try again.
|
// This previously failed in the macOS sandbox, so don't try again.
|
||||||
|
Loading…
Reference in New Issue
Block a user