portlist: de-dup services on same (proto, port) on both IPv4/IPv6

Fixes #1703

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-04-13 14:40:33 -07:00
parent a8d95a18b2
commit 2df6372b67
2 changed files with 21 additions and 6 deletions
-6
View File
@@ -12,7 +12,6 @@ import (
"os"
"path/filepath"
"runtime"
"sort"
"strconv"
"strings"
"syscall"
@@ -71,11 +70,6 @@ func listPorts() (List, error) {
l = append(l, ports...)
}
sort.Slice(l, func(i, j int) bool {
return (&l[i]).lessThan(&l[j])
})
return l, nil
}