control/controlclient, types/netmap: remove unused LocalPort field

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2022-06-19 16:31:54 -07:00
committed by Brad Fitzpatrick
parent 526b0b6890
commit a1e429f7c3
7 changed files with 19 additions and 43 deletions

View File

@@ -32,7 +32,6 @@ type NetworkMap struct {
// Name is the DNS name assigned to this node.
Name string
Addresses []netaddr.IPPrefix // same as tailcfg.Node.Addresses (IP addresses of this Node directly)
LocalPort uint16 // used for debugging
MachineStatus tailcfg.MachineStatus
MachineKey key.MachinePublic
Peers []*tailcfg.Node // sorted by Node.ID
@@ -148,9 +147,6 @@ func (nm *NetworkMap) printConciseHeader(buf *strings.Builder) {
}
}
fmt.Fprintf(buf, " u=%s", login)
if nm.LocalPort != 0 {
fmt.Fprintf(buf, " port=%v", nm.LocalPort)
}
if nm.Debug != nil {
j, _ := json.Marshal(nm.Debug)
fmt.Fprintf(buf, " debug=%s", j)
@@ -164,7 +160,6 @@ func (nm *NetworkMap) printConciseHeader(buf *strings.Builder) {
func (a *NetworkMap) equalConciseHeader(b *NetworkMap) bool {
if a.NodeKey != b.NodeKey ||
a.MachineStatus != b.MachineStatus ||
a.LocalPort != b.LocalPort ||
a.User != b.User ||
len(a.Addresses) != len(b.Addresses) {
return false