diff options
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/channels.c b/channels.c index d1c90b4ac..defe5ecba 100644 --- a/channels.c +++ b/channels.c | |||
@@ -40,7 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include "includes.h" | 42 | #include "includes.h" |
43 | RCSID("$OpenBSD: channels.c,v 1.94 2001/02/28 12:55:07 markus Exp $"); | 43 | RCSID("$OpenBSD: channels.c,v 1.95 2001/02/28 21:27:48 markus Exp $"); |
44 | 44 | ||
45 | #include <openssl/rsa.h> | 45 | #include <openssl/rsa.h> |
46 | #include <openssl/dsa.h> | 46 | #include <openssl/dsa.h> |
@@ -768,6 +768,7 @@ channel_handle_rfd(Channel *c, fd_set * readset, fd_set * writeset) | |||
768 | int | 768 | int |
769 | channel_handle_wfd(Channel *c, fd_set * readset, fd_set * writeset) | 769 | channel_handle_wfd(Channel *c, fd_set * readset, fd_set * writeset) |
770 | { | 770 | { |
771 | struct termios tio; | ||
771 | int len; | 772 | int len; |
772 | 773 | ||
773 | /* Send buffered output data to the socket. */ | 774 | /* Send buffered output data to the socket. */ |
@@ -789,16 +790,15 @@ channel_handle_wfd(Channel *c, fd_set * readset, fd_set * writeset) | |||
789 | return -1; | 790 | return -1; |
790 | } | 791 | } |
791 | if (compat20 && c->isatty) { | 792 | if (compat20 && c->isatty) { |
792 | struct termios tio; | ||
793 | if (tcgetattr(c->wfd, &tio) == 0 && | 793 | if (tcgetattr(c->wfd, &tio) == 0 && |
794 | !(tio.c_lflag & ECHO) && (tio.c_lflag & ICANON)) { | 794 | !(tio.c_lflag & ECHO) && (tio.c_lflag & ICANON)) { |
795 | /* | 795 | /* |
796 | * Simulate echo to reduce the impact of | 796 | * Simulate echo to reduce the impact of |
797 | * traffic analysis. | 797 | * traffic analysis. We need too match the |
798 | * size of a SSH2_MSG_CHANNEL_DATA message | ||
799 | * (4 byte channel id + data) | ||
798 | */ | 800 | */ |
799 | packet_start(SSH2_MSG_IGNORE); | 801 | packet_send_ignore(4 + len); |
800 | memset(buffer_ptr(&c->output), 0, len); | ||
801 | packet_put_string(buffer_ptr(&c->output), len); | ||
802 | packet_send(); | 802 | packet_send(); |
803 | } | 803 | } |
804 | } | 804 | } |