mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09: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
3e83af5f5e
commit
87fd7d617e
@@ -914,6 +914,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) {
|
||||||
@@ -974,12 +975,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