channels: Do not be so picky about the extended data type

assume stderr by default and log only warning in case the data type is
non-standard.

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Sahana Prasad <sahana@redhat.com>
Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
Jakub Jelen
2023-07-13 13:56:19 +02:00
committed by Sahana Prasad
parent d0ffe917fb
commit 00bafe0a82

View File

@@ -590,10 +590,9 @@ SSH_PACKET_CALLBACK(channel_rcv_data)
return SSH_PACKET_USED;
}
is_stderr = 1;
data_type_code = ntohl(data_type_code);
if (data_type_code == SSH2_EXTENDED_DATA_STDERR) {
is_stderr = 1;
} else {
if (data_type_code != SSH2_EXTENDED_DATA_STDERR) {
SSH_LOG(SSH_LOG_PACKET, "Invalid data type code %" PRIu32 "!",
data_type_code);
}