diff options
author | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-08-06 13:02:13 +0200 |
---|---|---|
committer | Mathias Hall-Andersen <mathias@hall-andersen.dk> | 2019-08-06 13:02:13 +0200 |
commit | a12e6e139c963cfe9c78edc9ae83a71049722f29 (patch) | |
tree | b6bfd82f28553c84eae5a48f6b43b4cf88cd5bbc /src/handshake/types.rs | |
parent | Prepare for resuse of message buffers for response (diff) | |
download | wireguard-rs-a12e6e139c963cfe9c78edc9ae83a71049722f29.tar.xz wireguard-rs-a12e6e139c963cfe9c78edc9ae83a71049722f29.zip |
Add rate limiter check to handshake messages.
Diffstat (limited to 'src/handshake/types.rs')
-rw-r--r-- | src/handshake/types.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/handshake/types.rs b/src/handshake/types.rs index 08c43d0..967704e 100644 --- a/src/handshake/types.rs +++ b/src/handshake/types.rs @@ -43,6 +43,7 @@ pub enum HandshakeError { OldTimestamp, InvalidState, InvalidMac1, + RateLimited } impl fmt::Display for HandshakeError { @@ -57,6 +58,7 @@ impl fmt::Display for HandshakeError { HandshakeError::OldTimestamp => write!(f, "Timestamp is less/equal to the newest"), HandshakeError::InvalidState => write!(f, "Message does not apply to handshake state"), HandshakeError::InvalidMac1 => write!(f, "Message has invalid mac1 field"), + HandshakeError::RateLimited => write!(f, "Message was dropped by rate limiter") } } } |