diff options
author | Colin Watson <cjwatson@debian.org> | 2003-09-01 18:52:37 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2003-09-01 18:52:37 +0000 |
commit | 854156dd39acbde9b4a47ec0fc54a042ea7358e0 (patch) | |
tree | 96755f8590acc2146f4b4ef5b5cdba600e5d9353 /clientloop.c | |
parent | fad82e8999e790899083f9e22a1841148d746df6 (diff) | |
parent | 053db7da5ce09acdf742789d9d1a05e81d4861d0 (diff) |
Import OpenSSH 3.6.1p2.
Diffstat (limited to 'clientloop.c')
-rw-r--r-- | clientloop.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/clientloop.c b/clientloop.c index f07725bbc..af207c070 100644 --- a/clientloop.c +++ b/clientloop.c | |||
@@ -59,7 +59,7 @@ | |||
59 | */ | 59 | */ |
60 | 60 | ||
61 | #include "includes.h" | 61 | #include "includes.h" |
62 | RCSID("$OpenBSD: clientloop.c,v 1.108 2003/04/02 09:48:07 markus Exp $"); | 62 | RCSID("$OpenBSD: clientloop.c,v 1.107 2003/04/01 10:22:21 markus Exp $"); |
63 | 63 | ||
64 | #include "ssh.h" | 64 | #include "ssh.h" |
65 | #include "ssh1.h" | 65 | #include "ssh1.h" |
@@ -490,13 +490,13 @@ process_cmdline(void) | |||
490 | if (*s == 0) | 490 | if (*s == 0) |
491 | goto out; | 491 | goto out; |
492 | if (strlen(s) < 2 || s[0] != '-' || !(s[1] == 'L' || s[1] == 'R')) { | 492 | if (strlen(s) < 2 || s[0] != '-' || !(s[1] == 'L' || s[1] == 'R')) { |
493 | logit("Invalid command."); | 493 | log("Invalid command."); |
494 | goto out; | 494 | goto out; |
495 | } | 495 | } |
496 | if (s[1] == 'L') | 496 | if (s[1] == 'L') |
497 | local = 1; | 497 | local = 1; |
498 | if (!local && !compat20) { | 498 | if (!local && !compat20) { |
499 | logit("Not supported for SSH protocol version 1."); | 499 | log("Not supported for SSH protocol version 1."); |
500 | goto out; | 500 | goto out; |
501 | } | 501 | } |
502 | s += 2; | 502 | s += 2; |
@@ -507,24 +507,24 @@ process_cmdline(void) | |||
507 | sfwd_port, buf, sfwd_host_port) != 3 && | 507 | sfwd_port, buf, sfwd_host_port) != 3 && |
508 | sscanf(s, "%5[0-9]/%255[^/]/%5[0-9]", | 508 | sscanf(s, "%5[0-9]/%255[^/]/%5[0-9]", |
509 | sfwd_port, buf, sfwd_host_port) != 3) { | 509 | sfwd_port, buf, sfwd_host_port) != 3) { |
510 | logit("Bad forwarding specification."); | 510 | log("Bad forwarding specification."); |
511 | goto out; | 511 | goto out; |
512 | } | 512 | } |
513 | if ((fwd_port = a2port(sfwd_port)) == 0 || | 513 | if ((fwd_port = a2port(sfwd_port)) == 0 || |
514 | (fwd_host_port = a2port(sfwd_host_port)) == 0) { | 514 | (fwd_host_port = a2port(sfwd_host_port)) == 0) { |
515 | logit("Bad forwarding port(s)."); | 515 | log("Bad forwarding port(s)."); |
516 | goto out; | 516 | goto out; |
517 | } | 517 | } |
518 | if (local) { | 518 | if (local) { |
519 | if (channel_setup_local_fwd_listener(fwd_port, buf, | 519 | if (channel_setup_local_fwd_listener(fwd_port, buf, |
520 | fwd_host_port, options.gateway_ports) < 0) { | 520 | fwd_host_port, options.gateway_ports) < 0) { |
521 | logit("Port forwarding failed."); | 521 | log("Port forwarding failed."); |
522 | goto out; | 522 | goto out; |
523 | } | 523 | } |
524 | } else | 524 | } else |
525 | channel_request_remote_forwarding(fwd_port, buf, | 525 | channel_request_remote_forwarding(fwd_port, buf, |
526 | fwd_host_port); | 526 | fwd_host_port); |
527 | logit("Forwarding port."); | 527 | log("Forwarding port."); |
528 | out: | 528 | out: |
529 | signal(SIGINT, handler); | 529 | signal(SIGINT, handler); |
530 | enter_raw_mode(); | 530 | enter_raw_mode(); |
@@ -577,7 +577,7 @@ process_escapes(Buffer *bin, Buffer *bout, Buffer *berr, char *buf, int len) | |||
577 | case 'R': | 577 | case 'R': |
578 | if (compat20) { | 578 | if (compat20) { |
579 | if (datafellows & SSH_BUG_NOREKEY) | 579 | if (datafellows & SSH_BUG_NOREKEY) |
580 | logit("Server does not support re-keying"); | 580 | log("Server does not support re-keying"); |
581 | else | 581 | else |
582 | need_rekeying = 1; | 582 | need_rekeying = 1; |
583 | } | 583 | } |
@@ -968,8 +968,9 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id) | |||
968 | /* Do channel operations unless rekeying in progress. */ | 968 | /* Do channel operations unless rekeying in progress. */ |
969 | if (!rekeying) { | 969 | if (!rekeying) { |
970 | channel_after_select(readset, writeset); | 970 | channel_after_select(readset, writeset); |
971 | if (need_rekeying || packet_need_rekeying()) { | 971 | |
972 | debug("need rekeying"); | 972 | if (need_rekeying) { |
973 | debug("user requests rekeying"); | ||
973 | xxx_kex->done = 0; | 974 | xxx_kex->done = 0; |
974 | kex_send_kexinit(xxx_kex); | 975 | kex_send_kexinit(xxx_kex); |
975 | need_rekeying = 0; | 976 | need_rekeying = 0; |