diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-07-11 18:48:29 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2017-07-11 18:48:29 +0200 |
commit | c273078376d5aa394e871e7436b8e770b0c3f4a0 (patch) | |
tree | e868b73a61000b61929f8cec9949818694d6f2a0 /src/receive.go | |
parent | 9c4acb9f358f576479975f7baaf6b4ed5ec932a8 (diff) |
Added ratelimiting of handshake messages
Diffstat (limited to 'src/receive.go')
-rw-r--r-- | src/receive.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/receive.go b/src/receive.go index e9c14f5..99089a9 100644 --- a/src/receive.go +++ b/src/receive.go @@ -319,6 +319,10 @@ func (device *Device) RoutineHandshake() { // ratelimit + if !device.ratelimiter.Allow(elem.source.IP) { + return + } + // handle messages switch elem.msgType { |