From 3353d14d40236d27dafd66194e0cdfa8ef6547d1 Mon Sep 17 00:00:00 2001 From: djm Date: Mon, 4 Sep 2023 00:04:02 +0000 Subject: [PATCH] avoid bogus "obfuscate_keystroke_timing: stopping ..." debug messages when keystroke timing obfuscation was never started; spotted by naddy@ --- usr.bin/ssh/clientloop.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c index 035643f9e09..9a1df648cd6 100644 --- a/usr.bin/ssh/clientloop.c +++ b/usr.bin/ssh/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.394 2023/08/28 04:06:52 djm Exp $ */ +/* $OpenBSD: clientloop.c,v 1.395 2023/09/04 00:04:02 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -564,9 +564,11 @@ obfuscate_keystroke_timing(struct ssh *ssh, struct timespec *timeout) } if (stop_reason != NULL) { - active = 0; - debug3_f("stopping: %s (%llu chaff packets sent)", - stop_reason, nchaff); + if (active) { + debug3_f("stopping: %s (%llu chaff packets sent)", + stop_reason, nchaff); + active = 0; + } return 1; } -- 2.20.1