From 2a266430e3fbae4eac97182e04dbd91f275a1b3c Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Thu, 8 Nov 2018 22:00:07 +0100 Subject: ssh: handle MSG_GOBAL_REQUEST respond to MSG_GLOBAL_REQUEST with MSG_REQUEST_FAILURE as stated by rfc4254 when server wants a reply. failing todo so breaks some proprietary keep-alive schemes. --- sys/src/cmd/ssh.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sys/src/cmd/ssh.c') diff --git a/sys/src/cmd/ssh.c b/sys/src/cmd/ssh.c index 14e8ef2e5..0fce63315 100644 --- a/sys/src/cmd/ssh.c +++ b/sys/src/cmd/ssh.c @@ -961,7 +961,13 @@ dispatch(void) switch(recv.r[0]){ case MSG_IGNORE: + return; case MSG_GLOBAL_REQUEST: + if(unpack(recv.r, recv.w-recv.r, "_sb", &s, &n, &b) < 0) + break; + if(debug) + fprint(2, "%s: ignoring global request %.*s\n", argv0, n, s); + if(b != 0) sendpkt("b", MSG_REQUEST_FAILURE); return; case MSG_DISCONNECT: if(unpack(recv.r, recv.w-recv.r, "_us", &c, &s, &n) < 0) -- cgit v1.2.3