Oops; we _do_ need to set dport even when doing dynamic forwarding,
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 18 Apr 2003 09:06:11 +0000 (09:06 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Fri, 18 Apr 2003 09:06:11 +0000 (09:06 +0000)
because otherwise the `if (sport && dport)' statement runs the risk
of not working.

git-svn-id: svn://svn.tartarus.org/sgt/putty@3129 cda61777-01e9-0310-a592-d414129be87e

ssh.c

diff --git a/ssh.c b/ssh.c
index 925c5b5..a004176 100644 (file)
--- 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;