@ -45,6 +45,7 @@ type mapSession struct {
collectServices bool
collectServices bool
previousPeers [ ] * tailcfg . Node // for delta-purposes
previousPeers [ ] * tailcfg . Node // for delta-purposes
lastDomain string
lastDomain string
lastDomainAuditLogID string
lastHealth [ ] string
lastHealth [ ] string
lastPopBrowserURL string
lastPopBrowserURL string
stickyDebug tailcfg . Debug // accumulated opt.Bool values
stickyDebug tailcfg . Debug // accumulated opt.Bool values
@ -113,6 +114,9 @@ func (ms *mapSession) netmapForResponse(resp *tailcfg.MapResponse) *netmap.Netwo
if resp . Domain != "" {
if resp . Domain != "" {
ms . lastDomain = resp . Domain
ms . lastDomain = resp . Domain
}
}
if resp . DomainDataPlaneAuditLogID != "" {
ms . lastDomainAuditLogID = resp . DomainDataPlaneAuditLogID
}
if resp . Health != nil {
if resp . Health != nil {
ms . lastHealth = resp . Health
ms . lastHealth = resp . Health
}
}
@ -143,20 +147,21 @@ func (ms *mapSession) netmapForResponse(resp *tailcfg.MapResponse) *netmap.Netwo
}
}
nm := & netmap . NetworkMap {
nm := & netmap . NetworkMap {
NodeKey : ms . privateNodeKey . Public ( ) ,
NodeKey : ms . privateNodeKey . Public ( ) ,
PrivateKey : ms . privateNodeKey ,
PrivateKey : ms . privateNodeKey ,
MachineKey : ms . machinePubKey ,
MachineKey : ms . machinePubKey ,
Peers : resp . Peers ,
Peers : resp . Peers ,
UserProfiles : make ( map [ tailcfg . UserID ] tailcfg . UserProfile ) ,
UserProfiles : make ( map [ tailcfg . UserID ] tailcfg . UserProfile ) ,
Domain : ms . lastDomain ,
Domain : ms . lastDomain ,
DNS : * ms . lastDNSConfig ,
DomainAuditLogID : ms . lastDomainAuditLogID ,
PacketFilter : ms . lastParsedPacketFilter ,
DNS : * ms . lastDNSConfig ,
SSHPolicy : ms . lastSSHPolicy ,
PacketFilter : ms . lastParsedPacketFilter ,
CollectServices : ms . collectServices ,
SSHPolicy : ms . lastSSHPolicy ,
DERPMap : ms . lastDERPMap ,
CollectServices : ms . collectServices ,
Debug : debug ,
DERPMap : ms . lastDERPMap ,
ControlHealth : ms . lastHealth ,
Debug : debug ,
TKAEnabled : ms . lastTKAInfo != nil && ! ms . lastTKAInfo . Disabled ,
ControlHealth : ms . lastHealth ,
TKAEnabled : ms . lastTKAInfo != nil && ! ms . lastTKAInfo . Disabled ,
}
}
ms . netMapBuilding = nm
ms . netMapBuilding = nm