1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Uppity: expect SSH1_CMSG_EXIT_CONFIRMATION.

I've only just noticed that the server-side SSH-1 connection layer had
no handler for that message, so when an SSH-1 connection terminates in
the normal way, Uppity's event log reports 'Unexpected packet
received, type 33 (SSH1_CMSG_EXIT_CONFIRMATION)', which is wrong in
that it _should_ be expected!
This commit is contained in:
Simon Tatham 2019-01-18 19:14:41 +00:00
parent bf743bf85c
commit 6dc8860f8a
2 changed files with 12 additions and 0 deletions

View File

@ -239,6 +239,15 @@ bool ssh1_handle_direction_specific_packet(
return true;
case SSH1_CMSG_EXIT_CONFIRMATION:
if (!s->sent_exit_status) {
ssh_proto_error(s->ppl.ssh, "Received SSH1_CMSG_EXIT_CONFIRMATION"
" without having sent SSH1_SMSG_EXIT_STATUS");
return true;
}
ppl_logevent("Client sent exit confirmation");
return true;
default:
return false;
}
@ -301,6 +310,8 @@ static void ssh1sesschan_send_exit_status(SshChannel *sc, int status)
pktout = ssh_bpp_new_pktout(s->ppl.bpp, SSH1_SMSG_EXIT_STATUS);
put_uint32(pktout, status);
pq_push(s->ppl.out_pq, pktout);
s->sent_exit_status = true;
}
static void ssh1sesschan_send_exit_signal(

View File

@ -50,6 +50,7 @@ struct ssh1_connection_state {
struct outstanding_succfail *succfail_head, *succfail_tail;
bool compressing; /* used in server mode only */
bool sent_exit_status; /* also for server mode */
ConnectionLayer cl;
PacketProtocolLayer ppl;