diff options
| author | Josh Bleecher Snyder <josh@tailscale.com> | 2021-11-10 14:05:38 -0800 |
|---|---|---|
| committer | Josh Bleecher Snyder <josh@tailscale.com> | 2021-11-10 14:05:38 -0800 |
| commit | aec281e6389ab6e95a2bee073aabacf00139db4a (patch) | |
| tree | f4fde8f63ba0b8c5622d40c8ffeb51972141e2e8 | |
| parent | 2bef8ececedce456baba5254e44e3885db3d4bd6 (diff) | |
| download | tailscale-josh/peermap.tar.xz tailscale-josh/peermap.zip | |
wgengine/magicsock: call peerMap.validate at the end of SetNetworkMapjosh/peermap
Not for prod, maybe useful for debugging.
| -rw-r--r-- | wgengine/magicsock/magicsock.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/wgengine/magicsock/magicsock.go b/wgengine/magicsock/magicsock.go index cdb712007..db35e8197 100644 --- a/wgengine/magicsock/magicsock.go +++ b/wgengine/magicsock/magicsock.go @@ -2264,6 +2264,11 @@ func nodesEqual(x, y []*tailcfg.Node) bool { func (c *Conn) SetNetworkMap(nm *netmap.NetworkMap) { c.mu.Lock() defer c.mu.Unlock() + defer func() { + if err := c.peerMap.validate(); err != nil { + panic(err) + } + }() if c.closed { return |
