[Bug 3655] Default ObscureKeystrokeTiming makes X forwarding really slow
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Sun Oct 13 11:39:00 AEDT 2024
https://bugzilla.mindrot.org/show_bug.cgi?id=3655
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |djm at mindrot.org
--- Comment #6 from Damien Miller <djm at mindrot.org> ---
Thanks for the patch - it looks good, except for this bit
> + for (i = 0; i < ssh->chanctxt->channels_alloc; i++) {
> + c = ssh->chanctxt->channels[i];
> + if (c == NULL || c->ctype == NULL || c->lastused == 0 ||
> + strcmp(c->ctype, "x11-connection"))
> + continue;
> + if (monotime() - c->lastused < 1)
> + return 1;
> + }
which will call monotime() a bunch.
IMO it would be better to do something like this:
time_t lastused = 0;
for (i = 0; i < ssh->chanctxt->channels_alloc; i++) {
c = ssh->chanctxt->channels[i];
if (c == NULL || c->ctype == NULL || c->lastused == 0 ||
strcmp(c->ctype, "x11-connection"))
continue;
lastused = c->lastused;
}
return (lastused != 0 && monotime() > lastused + 1);
--
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list