Add rate limiter check to handshake messages.
This commit is contained in:
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user