I cannot forward to a socket on the remote host ("No forward host name.").

Example:

  ssh -L 12345:/tmp/sock

Index: channels.c
===================================================================
RCS file: /cvs/src/usr.bin/ssh/channels.c,v
retrieving revision 1.336
diff -u -p -r1.336 channels.c
--- channels.c  15 Jul 2014 15:54:14 -0000      1.336
+++ channels.c  8 Aug 2014 20:31:29 -0000
@@ -2771,13 +2770,18 @@ channel_setup_fwd_listener_tcpip(int typ
            fwd->listen_host : fwd->connect_host;
        is_client = (type == SSH_CHANNEL_PORT_LISTENER);
 
-       if (host == NULL) {
-               error("No forward host name.");
-               return 0;
-       }
-       if (strlen(host) >= NI_MAXHOST) {
-               error("Forward host name too long.");
-               return 0;
+       if (type == SSH_CHANNEL_PORT_LISTENER &&
+           fwd->connect_path)
+               host = fwd->connect_path;
+       else {
+               if (host == NULL) {
+                       error("No forward host name.");
+                       return 0;
+               }
+               if (strlen(host) >= NI_MAXHOST) {
+                       error("Forward host name too long.");
+                       return 0;
+               }
        }
 
        /* Determine the bind address, cf. channel_fwd_bind_addr() comment */

Reply via email to