Added ratelimiting of handshake messages
This commit is contained in:
parent
9c4acb9f35
commit
c273078376
5 changed files with 248 additions and 5 deletions
|
|
@ -319,6 +319,10 @@ func (device *Device) RoutineHandshake() {
|
|||
|
||||
// ratelimit
|
||||
|
||||
if !device.ratelimiter.Allow(elem.source.IP) {
|
||||
return
|
||||
}
|
||||
|
||||
// handle messages
|
||||
|
||||
switch elem.msgType {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue