From ddbe0e6daba198f53104813c7387c221a2491381 Mon Sep 17 00:00:00 2001 From: David Garske Date: Thu, 8 Jul 2021 09:31:59 -0700 Subject: [PATCH] Fix for sniffer stats on resume miss. The logic for `hello_retry_request` will no longer try and do resume, so restore `BAD_SESSION_RESUME_STR` error. --- src/sniffer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sniffer.c b/src/sniffer.c index 11a496119..8ea894460 100644 --- a/src/sniffer.c +++ b/src/sniffer.c @@ -2797,11 +2797,11 @@ static int DoResume(SnifferSession* session, char* error) session->sslServer->arrays->masterSecret, 0); } if (resume == NULL) { - /* a session id without resume is okay with hello_retry_request */ #ifdef WOLFSSL_SNIFFER_STATS - INC_STAT(SnifferStats.sslStandardConns); + INC_STAT(SnifferStats.sslResumeMisses); #endif - return 0; + SetError(BAD_SESSION_RESUME_STR, error, session, FATAL_ERROR_STATE); + return -1; } /* make sure client has master secret too */