There's no real need for portfwd.c to reference `cfg' directly, when
[u/mdw/putty] / ssh.c
diff --git a/ssh.c b/ssh.c
index 70f3a06..dde5bfa 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -3121,7 +3121,7 @@ static void ssh1_protocol(Ssh ssh, unsigned char *in, int inlen, int ispkt)
            if (sport && dport) {
                if (type == 'L') {
                    pfd_addforward(host, dport, *saddr ? saddr : NULL,
-                                  sport, ssh);
+                                  sport, ssh, ssh->cfg.lport_acceptall);
                    logeventf(ssh, "Local port %.*s%.*s%.*s%.*s%d%.*s"
                              " forwarding to %s:%.*s%.*s%d%.*s",
                              (int)(*saddr?strlen(saddr):0), *saddr?saddr:NULL,
@@ -5185,7 +5185,7 @@ static void do_ssh2_authconn(Ssh ssh, unsigned char *in, int inlen, int ispkt)
            if (sport && dport) {
                if (type == 'L') {
                    pfd_addforward(host, dport, *saddr ? saddr : NULL,
-                                  sport, ssh);
+                                  sport, ssh, ssh->cfg.lport_acceptall);
                    logeventf(ssh, "Local port %.*s%.*s%.*s%.*s%d%.*s"
                              " forwarding to %s:%.*s%.*s%d%.*s",
                              (int)(*saddr?strlen(saddr):0), *saddr?saddr:NULL,