From 717fd50963507459efd7e8c1d64cf4ec612b8e67 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 18 Apr 2003 09:06:11 +0000 Subject: [PATCH] Oops; we _do_ need to set dport even when doing dynamic forwarding, because otherwise the `if (sport && dport)' statement runs the risk of not working. [originally from svn r3129] --- ssh.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ssh.c b/ssh.c index 925c5b5e..a0041767 100644 --- a/ssh.c +++ b/ssh.c @@ -3177,6 +3177,7 @@ static void ssh1_protocol(Ssh ssh, unsigned char *in, int inlen, int ispkt) } } else { while (*ssh->portfwd_strptr) ssh->portfwd_strptr++; + dport = -1; } sport = atoi(sports); sserv = 0; @@ -5271,6 +5272,7 @@ static void do_ssh2_authconn(Ssh ssh, unsigned char *in, int inlen, int ispkt) } } else { while (*ssh->portfwd_strptr) ssh->portfwd_strptr++; + dport = -1; } sport = atoi(sports); sserv = 0;