Added ratelimiting of handshake messages

This commit is contained in:
Mathias Hall-Andersen
2017-07-11 18:48:29 +02:00
parent 9c4acb9f35
commit c273078376
5 changed files with 248 additions and 5 deletions

View File

@@ -319,6 +319,10 @@ func (device *Device) RoutineHandshake() {
// ratelimit
if !device.ratelimiter.Allow(elem.source.IP) {
return
}
// handle messages
switch elem.msgType {