1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-29 01:03:57 +03:00

message: Handle all unknown global messages.

Reply to unknown global messages as required by the RFC. Therefore
keepalive@openssh.com style messages should get treated in a sane way.
This commit is contained in:
rofl0r
2011-12-31 14:55:01 +01:00
committed by Andreas Schneider
parent 7d26f7ceab
commit c08bdf5917

View File

@@ -1252,6 +1252,7 @@ SSH_PACKET_CALLBACK(ssh_packet_global_request){
(void)user;
(void)type;
(void)packet;
int rc = SSH_PACKET_USED;
request_s = buffer_get_ssh_string(packet);
if (request_s != NULL) {
@@ -1312,12 +1313,14 @@ SSH_PACKET_CALLBACK(ssh_packet_global_request){
}
} else {
ssh_log(session, SSH_LOG_PROTOCOL, "UNKNOWN SSH_MSG_GLOBAL_REQUEST %s %d", request, want_reply);
rc = SSH_PACKET_NOT_USED;
}
SAFE_FREE(msg);
SAFE_FREE(request);
SAFE_FREE(bind_addr);
return SSH_PACKET_USED;
return rc;
}
#endif /* WITH_SERVER */