summaryrefslogtreecommitdiff
path: root/common-session.c
diff options
context:
space:
mode:
Diffstat (limited to 'common-session.c')
-rw-r--r--common-session.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/common-session.c b/common-session.c
index aa31e49..7531563 100644
--- a/common-session.c
+++ b/common-session.c
@@ -147,6 +147,10 @@ void common_session_init(int sock_in, int sock_out) {
ses.allowprivport = 0;
+#if DROPBEAR_PLUGIN
+ ses.plugin_session = NULL;
+#endif
+
TRACE(("leave session_init"))
}
@@ -366,8 +370,11 @@ static void read_session_identification() {
int len = 0;
char done = 0;
int i;
- /* If they send more than 50 lines, something is wrong */
- for (i = 0; i < 50; i++) {
+
+ /* Servers may send other lines of data before sending the
+ * version string, client must be able to process such lines.
+ * If they send more than 50 lines, something is wrong */
+ for (i = IS_DROPBEAR_CLIENT ? 50 : 1; i > 0; i--) {
len = ident_readln(ses.sock_in, linebuf, sizeof(linebuf));
if (len < 0 && errno != EINTR) {