From 7a5cf39d0dcaf1d8f76eb5967a8843c0d0c2be87 Mon Sep 17 00:00:00 2001 From: Mihai Parparita Date: Thu, 25 Aug 2022 12:30:08 -0700 Subject: [PATCH] ipn/ipnlocal: fix Taildrop not returning any sharing targets The CapabilityFileSharingTarget capability added by eb32847d8525e61c7435 is meant to control the ability to share with nodes not owned by the current user, not to restrict all sharing (the coordination server is not currently populating the capability at all) Fixes tailscale/corp#6669 Signed-off-by: Mihai Parparita --- ipn/ipnlocal/local.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index e866c1e8b..1b59bdd4c 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -3287,7 +3287,7 @@ func (b *LocalBackend) FileTargets() ([]*apitype.FileTarget, error) { return nil, errors.New("file sharing not enabled by Tailscale admin") } for _, p := range nm.Peers { - if p.User != nm.User || !slices.Contains(p.Capabilities, tailcfg.CapabilityFileSharingTarget) { + if p.User != nm.User && !slices.Contains(p.Capabilities, tailcfg.CapabilityFileSharingTarget) { continue } peerAPI := peerAPIBase(b.netMap, p)