]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
pull a small netcat SOCKS4A fix from upstream
authorDamien Miller <djm@mindrot.org>
Wed, 21 May 2025 09:14:47 +0000 (19:14 +1000)
committerDamien Miller <djm@mindrot.org>
Wed, 21 May 2025 09:14:47 +0000 (19:14 +1000)
regress/netcat.c

index 51e999df6d68428814707108f931e8ddaf0e911a..1eac0218aaf13f08778d3e1d6eb9fb757f40bd6a 100644 (file)
@@ -1589,9 +1589,11 @@ socks_connect(const char *host, const char *port,
                        errx(1, "connection failed, unsupported address type");
                }
        } else if (socksv == 4 || socksv == 44) {
-               /* This will exit on lookup failure */
-               decode_addrport(host, port, (struct sockaddr *)&addr,
-                   sizeof(addr), 1, 0);
+               if (socksv == 4) {
+                       /* This will exit on lookup failure */
+                       decode_addrport(host, port, (struct sockaddr *)&addr,
+                           sizeof(addr), 1, 0);
+               }
 
                /* Version 4 */
                buf[0] = SOCKS_V4;