mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-09 08:01:31 +00:00
portlist: ignore ports bound to localhost
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
c706731dc7
commit
f8d67bb591
@@ -59,6 +59,10 @@ func listPorts() (List, error) {
|
||||
rem := words[2]
|
||||
inode := words[9]
|
||||
|
||||
// If a port is bound to 127.0.0.1, ignore it.
|
||||
if strings.HasPrefix(local, "0100007F:") {
|
||||
continue
|
||||
}
|
||||
if rem != "00000000:0000" {
|
||||
// not a "listener" port
|
||||
continue
|
||||
|
Reference in New Issue
Block a user