packet: Check return value when sending unimplemented

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Anderson Toshiyuki Sasaki
2019-06-24 18:43:14 +02:00
committed by Andreas Schneider
parent a1ee22eb64
commit 6a9185636f

View File

@@ -1480,7 +1480,11 @@ void ssh_packet_process(ssh_session session, uint8_t type)
if (rc == SSH_PACKET_NOT_USED) {
SSH_LOG(SSH_LOG_RARE, "Couldn't do anything with packet type %d", type);
ssh_packet_send_unimplemented(session, session->recv_seq - 1);
rc = ssh_packet_send_unimplemented(session, session->recv_seq - 1);
if (rc != SSH_OK) {
SSH_LOG(SSH_LOG_RARE, "Failed to send unimplemented: %s",
ssh_get_error(session));
}
}
}