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

@@ -846,6 +846,10 @@ next:
}
}
events.Default.Log(events.NodeRejected, map[string]string{
"node": remoteID.String(),
"address": conn.RemoteAddr().String(),
})
l.Infof("Connection from %s with unknown node ID %s; ignoring", conn.RemoteAddr(), remoteID)
conn.Close()
}