summaryrefslogtreecommitdiff
path: root/sys/src/cmd/ssh.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2018-11-08 22:00:07 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2018-11-08 22:00:07 +0100
commit2a266430e3fbae4eac97182e04dbd91f275a1b3c (patch)
tree4db5d164a5a98008557b9c343714d06663a78131 /sys/src/cmd/ssh.c
parent615f43b76e5f67c2e737c6b039df48ffccd1fde3 (diff)
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.
Diffstat (limited to 'sys/src/cmd/ssh.c')
-rw-r--r--sys/src/cmd/ssh.c6
1 files changed, 6 insertions, 0 deletions
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)