ipn/ipnlocal: fix Taildrop regression from refactoring

This fixes a refactoring bug introduced in 8b72dd7873201

Tests (that failed on this) are coming in a separate change.

Updates #15812

Change-Id: Ibbf461b4eaefe22ad3005fc243d0a918e8af8981
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2025-04-30 21:23:43 -07:00 committed by Brad Fitzpatrick
parent e05e620096
commit a0d7c81a27

View File

@ -194,8 +194,8 @@ func (b *LocalBackend) FileTargets() ([]*apitype.FileTarget, error) {
if !p.Valid() || p.Hostinfo().OS() == "tvOS" { if !p.Valid() || p.Hostinfo().OS() == "tvOS" {
return false return false
} }
if self != p.User() { if self == p.User() {
return false return true
} }
if p.Addresses().Len() != 0 && cn.PeerHasCap(p.Addresses().At(0).Addr(), tailcfg.PeerCapabilityFileSharingTarget) { if p.Addresses().Len() != 0 && cn.PeerHasCap(p.Addresses().At(0).Addr(), tailcfg.PeerCapabilityFileSharingTarget) {
// Explicitly noted in the netmap ACL caps as a target. // Explicitly noted in the netmap ACL caps as a target.