ipn/ipnlocal: fix Taildrop regression from refactoring

This fixes a refactoring bug introduced in 8b72dd7873

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

Updates #15812

Change-Id: Ibbf461b4eaefe22ad3005fc243d0a918e8af8981
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/15853/head
Brad Fitzpatrick 8 months ago committed by Brad Fitzpatrick
parent e05e620096
commit a0d7c81a27

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

Loading…
Cancel
Save