(cur *tailcfg.DERPMap)
| 163 | } |
| 164 | |
| 165 | func (b *TelemetryStore) updateDerpMapLocked(cur *tailcfg.DERPMap) { |
| 166 | if cur == nil { |
| 167 | return |
| 168 | } |
| 169 | cleanMap := cur.Clone() |
| 170 | for _, r := range cleanMap.Regions { |
| 171 | for _, n := range r.Nodes { |
| 172 | ipv4, _, _ := b.processIPLocked(n.IPv4) |
| 173 | n.IPv4 = ipv4 |
| 174 | ipv6, _, _ := b.processIPLocked(n.IPv6) |
| 175 | n.IPv6 = ipv6 |
| 176 | stunIP, _, _ := b.processIPLocked(n.STUNTestIP) |
| 177 | n.STUNTestIP = stunIP |
| 178 | hn := b.hashAddrorHostname(n.HostName) |
| 179 | n.HostName = hn |
| 180 | cn := b.hashAddrorHostname(n.CertName) |
| 181 | n.CertName = cn |
| 182 | } |
| 183 | } |
| 184 | b.cleanDerpMap = cleanMap |
| 185 | } |
| 186 | |
| 187 | // Update the telemetry store with the current self node state. |
| 188 | // Returns true if the home DERP has changed. |
no test coverage detected