mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-10 09:45:08 +00:00
ipn/ipnlocal,tka: Fix bugs found by integration testing
* tka.State.staticValidateCheckpoint could call methods on a contained key prior to calling StaticValidate on that key * Remove broken backoff / RPC retry logic from tka methods in ipn/ipnlocal, to be fixed at a later time * Fix NetworkLockModify() which would attempt to take b.mu twice and deadlock, remove now-unused dependence on netmap * Add methods on ipnlocal.LocalBackend to be used in integration tests * Use TAILSCALE_USE_WIP_CODE as the feature flag so it can be manipulated in tests Signed-off-by: Tom DNetto <tom@tailscale.com>
This commit is contained in:
@@ -249,6 +249,10 @@ func (s *State) staticValidateCheckpoint() error {
|
||||
if err := k.StaticValidate(); err != nil {
|
||||
return fmt.Errorf("key[%d]: %v", i, err)
|
||||
}
|
||||
}
|
||||
// NOTE: The max number of keys is constrained (512), so
|
||||
// O(n^2) is fine.
|
||||
for i, k := range s.Keys {
|
||||
for j, k2 := range s.Keys {
|
||||
if i == j {
|
||||
continue
|
||||
|
Reference in New Issue
Block a user