wgengine/magicsock: expand AddrSet.addrs comment

pull/149/head
Brad Fitzpatrick 5 years ago
parent e733fa6f7e
commit fe0051fafd

@ -1010,8 +1010,16 @@ func (c *Conn) LinkChange() {
// AddrSet is a set of UDP addresses that implements wireguard/conn.Endpoint. // AddrSet is a set of UDP addresses that implements wireguard/conn.Endpoint.
type AddrSet struct { type AddrSet struct {
publicKey key.Public // peer public key used for DERP communication publicKey key.Public // peer public key used for DERP communication
addrs []net.UDPAddr // ordered priority list (low to high) provided by wgengine
// addrs is an ordered priority list provided by wgengine,
// sorted from expensive+slow+reliable at the begnining to
// fast+cheap at the end. More concretely, it's typically:
//
// [DERP fakeip:node, Global IP:port, LAN ip:port]
//
// But there could be multiple or none of each.
addrs []net.UDPAddr
mu sync.Mutex // guards following fields mu sync.Mutex // guards following fields

Loading…
Cancel
Save