Emit Node/Repo Rejected events on unknown nodes / repos.

This commit is contained in:
Jakob Borg
2014-08-18 23:34:03 +02:00
parent b221e4d445
commit 6bbf1f9355
3 changed files with 14 additions and 0 deletions

View File

@@ -332,6 +332,10 @@ func (m *Model) Index(nodeID protocol.NodeID, repo string, fs []protocol.FileInf
}
if !m.repoSharedWith(repo, nodeID) {
events.Default.Log(events.RepoRejected, map[string]string{
"repo": repo,
"node": nodeID.String(),
})
l.Warnf("Unexpected repository ID %q sent from node %q; ensure that the repository exists and that this node is selected under \"Share With\" in the repository configuration.", repo, nodeID)
return
}