Discard data with missing key, do not shut down

Probably more resilient to DoS.
This commit is contained in:
Davide De Rosa 2019-12-02 20:28:02 +01:00
parent 8c4b0db301
commit 66ae7973ae
1 changed files with 2 additions and 2 deletions

View File

@ -470,8 +470,8 @@ public class OpenVPNSession: Session {
if (code == .dataV1) || (code == .dataV2) {
let key = firstByte & 0b111
guard let _ = keys[key] else {
log.error("Key with id \(key) not found")
deferStop(.shutdown, OpenVPNError.badKey)
log.warning("Key with id \(key) not found")
// deferStop(.shutdown, OpenVPNError.badKey)
return
}