diff options
author | djm@openbsd.org <djm@openbsd.org> | 2024-10-14 00:20:06 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2024-10-14 00:21:08 +0200 |
commit | fe6c6330c1a94c7a537efe9069853ce7a275c50a (patch) | |
tree | 7f7abec914a6f623330c6169002f75ffc392f34f /clientloop.c | |
parent | upstream: remove duplicate misc.h include ok dtucker@ (diff) | |
download | openssh-fe6c6330c1a94c7a537efe9069853ce7a275c50a.tar.xz openssh-fe6c6330c1a94c7a537efe9069853ce7a275c50a.zip |
upstream: don't start the ObscureKeystrokeTiming mitigations if
there has been traffic on a X11 forwarding channel recently.
Should fix X11 forwarding performance problems when this setting is
enabled. Patch from Antonio Larrosa via bz3655
OpenBSD-Commit-ID: 820284a92eb4592fcd3d181a62c1b86b08a4a7ab
Diffstat (limited to 'clientloop.c')
-rw-r--r-- | clientloop.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clientloop.c b/clientloop.c index 8ed8b1c34..ccd70b5a1 100644 --- a/clientloop.c +++ b/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.408 2024/07/01 04:31:17 djm Exp $ */ +/* $OpenBSD: clientloop.c,v 1.409 2024/10/13 22:20:06 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -659,9 +659,10 @@ obfuscate_keystroke_timing(struct ssh *ssh, struct timespec *timeout, if (just_started) return 1; - /* Don't arm output fd for poll until the timing interval has elapsed */ + /* Don't arm output fd for poll until the timing interval has elapsed... */ if (timespeccmp(&now, &next_interval, <)) - return 0; + /* ...unless there's x11 communicattion happening */ + return x11_channel_used_recently(ssh); /* Calculate number of intervals missed since the last check */ n = (now.tv_sec - next_interval.tv_sec) * 1000LL * 1000 * 1000; |