|
|
|
@ -751,22 +751,23 @@ func (c *Direct) sendMapRequest(ctx context.Context, maxPolls int, cb func(*Netw
|
|
|
|
|
c.mu.Unlock()
|
|
|
|
|
|
|
|
|
|
nm := &NetworkMap{
|
|
|
|
|
NodeKey: tailcfg.NodeKey(persist.PrivateNodeKey.Public()),
|
|
|
|
|
PrivateKey: persist.PrivateNodeKey,
|
|
|
|
|
MachineKey: machinePubKey,
|
|
|
|
|
Expiry: resp.Node.KeyExpiry,
|
|
|
|
|
Name: resp.Node.Name,
|
|
|
|
|
Addresses: resp.Node.Addresses,
|
|
|
|
|
Peers: resp.Peers,
|
|
|
|
|
LocalPort: localPort,
|
|
|
|
|
User: resp.Node.User,
|
|
|
|
|
UserProfiles: make(map[tailcfg.UserID]tailcfg.UserProfile),
|
|
|
|
|
Domain: resp.Domain,
|
|
|
|
|
DNS: resp.DNSConfig,
|
|
|
|
|
Hostinfo: resp.Node.Hostinfo,
|
|
|
|
|
PacketFilter: lastParsedPacketFilter,
|
|
|
|
|
DERPMap: lastDERPMap,
|
|
|
|
|
Debug: resp.Debug,
|
|
|
|
|
NodeKey: tailcfg.NodeKey(persist.PrivateNodeKey.Public()),
|
|
|
|
|
PrivateKey: persist.PrivateNodeKey,
|
|
|
|
|
MachineKey: machinePubKey,
|
|
|
|
|
Expiry: resp.Node.KeyExpiry,
|
|
|
|
|
Name: resp.Node.Name,
|
|
|
|
|
Addresses: resp.Node.Addresses,
|
|
|
|
|
Peers: resp.Peers,
|
|
|
|
|
LocalPort: localPort,
|
|
|
|
|
User: resp.Node.User,
|
|
|
|
|
UserProfiles: make(map[tailcfg.UserID]tailcfg.UserProfile),
|
|
|
|
|
Domain: resp.Domain,
|
|
|
|
|
DNS: resp.DNSConfig,
|
|
|
|
|
Hostinfo: resp.Node.Hostinfo,
|
|
|
|
|
PacketFilter: lastParsedPacketFilter,
|
|
|
|
|
CollectServices: resp.CollectServices,
|
|
|
|
|
DERPMap: lastDERPMap,
|
|
|
|
|
Debug: resp.Debug,
|
|
|
|
|
}
|
|
|
|
|
addUserProfile := func(userID tailcfg.UserID) {
|
|
|
|
|
if _, dup := nm.UserProfiles[userID]; dup {
|
|
|
|
|