From d976a84d7e238d6bbf24216ff6b641cf6ba7f81e Mon Sep 17 00:00:00 2001 From: maddie Date: Tue, 13 Jul 2021 23:25:43 +0800 Subject: [PATCH] derp: allow self node when verifying clients Fixes #2408 Signed-off-by: Maddie Zhan --- derp/derp_server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/derp/derp_server.go b/derp/derp_server.go index 06a97499b..32b09fb7b 100644 --- a/derp/derp_server.go +++ b/derp/derp_server.go @@ -797,6 +797,9 @@ func (s *Server) verifyClient(clientKey key.Public, info *clientInfo) error { if err != nil { return fmt.Errorf("failed to query local tailscaled status: %w", err) } + if clientKey == status.Self.PublicKey { + return nil + } if _, exists := status.Peer[clientKey]; !exists { return fmt.Errorf("client %v not in set of peers", clientKey) }