mirror of
https://github.com/tailscale/tailscale.git
synced 2024-12-01 14:05:39 +00:00
wgengine/magicsock: rename discoEndpoint.wgEndpointHostPort to wgEndpoint
Fields rename only. Part of the general effort to make our code agnostic about endpoint formatting. It's just a name, but it will soon be a misleading one; be more generic. Do this as a separate commit because it generates a lot of whitespace changes. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
parent
e0bd3cc70c
commit
ddd85b9d91
@ -2771,7 +2771,7 @@ func (c *Conn) ParseEndpoint(keyAddrs string) (conn.Endpoint, error) {
|
|||||||
publicKey: tailcfg.NodeKey(pk), // peer public key (for WireGuard + DERP)
|
publicKey: tailcfg.NodeKey(pk), // peer public key (for WireGuard + DERP)
|
||||||
discoKey: tailcfg.DiscoKey(discoKey), // for discovery mesages
|
discoKey: tailcfg.DiscoKey(discoKey), // for discovery mesages
|
||||||
discoShort: tailcfg.DiscoKey(discoKey).ShortString(),
|
discoShort: tailcfg.DiscoKey(discoKey).ShortString(),
|
||||||
wgEndpointHostPort: addrs,
|
wgEndpoint: addrs,
|
||||||
sentPing: map[stun.TxID]sentPing{},
|
sentPing: map[stun.TxID]sentPing{},
|
||||||
endpointState: map[netaddr.IPPort]*endpointState{},
|
endpointState: map[netaddr.IPPort]*endpointState{},
|
||||||
}
|
}
|
||||||
@ -3115,7 +3115,7 @@ type discoEndpoint struct {
|
|||||||
discoKey tailcfg.DiscoKey // for discovery mesages
|
discoKey tailcfg.DiscoKey // for discovery mesages
|
||||||
discoShort string // ShortString of discoKey
|
discoShort string // ShortString of discoKey
|
||||||
fakeWGAddr netaddr.IPPort // the UDP address we tell wireguard-go we're using
|
fakeWGAddr netaddr.IPPort // the UDP address we tell wireguard-go we're using
|
||||||
wgEndpointHostPort string // string from ParseEndpoint: "<hex-discovery-key>.disco.tailscale:12345"
|
wgEndpoint string // string from ParseEndpoint: "<hex-discovery-key>.disco.tailscale:12345"
|
||||||
|
|
||||||
// Owned by Conn.mu:
|
// Owned by Conn.mu:
|
||||||
lastPingFrom netaddr.IPPort
|
lastPingFrom netaddr.IPPort
|
||||||
@ -3295,7 +3295,7 @@ func (de *discoEndpoint) String() string {
|
|||||||
func (de *discoEndpoint) ClearSrc() {}
|
func (de *discoEndpoint) ClearSrc() {}
|
||||||
func (de *discoEndpoint) SrcToString() string { panic("unused") } // unused by wireguard-go
|
func (de *discoEndpoint) SrcToString() string { panic("unused") } // unused by wireguard-go
|
||||||
func (de *discoEndpoint) SrcIP() net.IP { panic("unused") } // unused by wireguard-go
|
func (de *discoEndpoint) SrcIP() net.IP { panic("unused") } // unused by wireguard-go
|
||||||
func (de *discoEndpoint) DstToString() string { return de.wgEndpointHostPort }
|
func (de *discoEndpoint) DstToString() string { return de.wgEndpoint }
|
||||||
func (de *discoEndpoint) DstIP() net.IP { panic("unused") }
|
func (de *discoEndpoint) DstIP() net.IP { panic("unused") }
|
||||||
func (de *discoEndpoint) DstToBytes() []byte { return packIPPort(de.fakeWGAddr) }
|
func (de *discoEndpoint) DstToBytes() []byte { return packIPPort(de.fakeWGAddr) }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user