mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-09 09:27:59 +00:00
Fix accidental termination of wait-for-rekey loop.
When I separated out the transport layer into its own source file, I also reworked the logic deciding when to rekey, and apparently that rework introduced a braino in which I compared rekey_reason (which is a pointer) to RK_NONE (which is a value of the enumerated type that lives in the similarly named variable rekey_class). Oops. The result was that after the first rekey, the loop would terminate the next time the transport coroutine got called, because the code just before the loop had zeroed out rekey_class but not rekey_reason. So there'd be a rekey on every keypress, or similar.
This commit is contained in:
parent
f22d442003
commit
e4ee11d4c2
@ -2392,7 +2392,7 @@ static void ssh2_transport_process_queue(PacketProtocolLayer *ppl)
|
||||
s->rekey_reason));
|
||||
}
|
||||
}
|
||||
} while (s->rekey_reason == RK_NONE);
|
||||
} while (s->rekey_class == RK_NONE);
|
||||
|
||||
/* Once we exit the above loop, we really are rekeying. */
|
||||
goto begin_key_exchange;
|
||||
|
Loading…
Reference in New Issue
Block a user