diff options
-rw-r--r-- | cli-session.c | 16 | ||||
-rw-r--r-- | svr-tcpfwd.c | 11 |
2 files changed, 23 insertions, 4 deletions
diff --git a/cli-session.c b/cli-session.c index 5e5af22..5f5800e 100644 --- a/cli-session.c +++ b/cli-session.c @@ -408,9 +408,19 @@ void cleantext(char* dirtytext) { } static void recv_msg_global_request_cli(void) { - TRACE(("recv_msg_global_request_cli")) - /* Send a proper rejection */ - send_msg_request_failure(); + unsigned int len = 0; + unsigned int wantreply = 0; + + len = buf_getint(ses.payload); + buf_incrpos(ses.payload, len); + wantreply = buf_getbool(ses.payload); + + TRACE(("recv_msg_global_request_cli: want_reply: %u", wantreply)); + + if (wantreply) { + /* Send a proper rejection */ + send_msg_request_failure(); + } } void cli_dropbear_exit(int exitcode, const char* format, va_list param) { diff --git a/svr-tcpfwd.c b/svr-tcpfwd.c index 879de7e..11b9222 100644 --- a/svr-tcpfwd.c +++ b/svr-tcpfwd.c @@ -39,8 +39,17 @@ /* This is better than SSH_MSG_UNIMPLEMENTED */ void recv_msg_global_request_remotetcp() { - TRACE(("recv_msg_global_request_remotetcp: remote tcp forwarding not compiled in")) + unsigned int len = 0; + unsigned int wantreply = 0; + + TRACE(("recv_msg_global_request_remotetcp: remote tcp forwarding not compiled in")) + + len = buf_getint(ses.payload); + buf_incrpos(ses.payload, len); + wantreply = buf_getbool(ses.payload); + if (wantreply) { send_msg_request_failure(); + } } /* */ |