mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-30 13:01:23 +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:
committed by
Andreas Schneider
parent
7d26f7ceab
commit
c08bdf5917
@@ -1252,6 +1252,7 @@ SSH_PACKET_CALLBACK(ssh_packet_global_request){
|
|||||||
(void)user;
|
(void)user;
|
||||||
(void)type;
|
(void)type;
|
||||||
(void)packet;
|
(void)packet;
|
||||||
|
int rc = SSH_PACKET_USED;
|
||||||
|
|
||||||
request_s = buffer_get_ssh_string(packet);
|
request_s = buffer_get_ssh_string(packet);
|
||||||
if (request_s != NULL) {
|
if (request_s != NULL) {
|
||||||
@@ -1312,12 +1313,14 @@ SSH_PACKET_CALLBACK(ssh_packet_global_request){
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ssh_log(session, SSH_LOG_PROTOCOL, "UNKNOWN SSH_MSG_GLOBAL_REQUEST %s %d", request, want_reply);
|
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(msg);
|
||||||
SAFE_FREE(request);
|
SAFE_FREE(request);
|
||||||
SAFE_FREE(bind_addr);
|
SAFE_FREE(bind_addr);
|
||||||
return SSH_PACKET_USED;
|
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* WITH_SERVER */
|
#endif /* WITH_SERVER */
|
||||||
|
|||||||
Reference in New Issue
Block a user