Skip to content

Commit

Permalink
Fix fileshare blocking when it is already blocked
Browse files Browse the repository at this point in the history
  • Loading branch information
devzbysiu committed Dec 17, 2024
1 parent e558df0 commit df68940
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions networker/networker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1636,6 +1636,10 @@ func (netw *Combined) BlockFileshare(uniqueAddress meshnet.UniqueAddress) error
}

func (netw *Combined) blockFileshare(publicKey string, address netip.Addr) error {
if !netw.isFilesharePermitted {
log.Println(internal.WarningPrefix, "fileshare is already forbidden")
return nil
}
ruleName := publicKey + "-allow-fileshare-rule-" + address.String()
return netw.removeRule(ruleName)
}
Expand Down

0 comments on commit df68940

Please sign in to comment.