]> andersk Git - openssh.git/blobdiff - clientloop.c
- stevesk@cvs.openbsd.org 2006/07/22 19:08:54
[openssh.git] / clientloop.c
index b99ba03c062d60c62fce7b7dd0578b80b0b2f823..9398dc9897ef3fd4610c9342a8dc29f9985ac74c 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.164 2006/06/26 10:36:15 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.169 2006/07/17 01:31:09 stevesk Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
+#include <sys/socket.h>
 #include <sys/ioctl.h>
 
 #include <ctype.h>
+#include <errno.h>
 #ifdef HAVE_PATHS_H
 #include <paths.h>
 #endif
 #include <signal.h>
 #include <termios.h>
+#include <unistd.h>
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -929,7 +932,7 @@ process_cmdline(void)
                    "Request local forward");
                logit("      -R[bind_address:]port:host:hostport    "
                    "Request remote forward");
-               logit("      -KR[bind_address:]hostport             "
+               logit("      -KR[bind_address:]port                 "
                    "Cancel remote forward");
                if (!options.permit_local_command)
                        goto out;
@@ -995,9 +998,12 @@ process_cmdline(void)
                                goto out;
                        }
                } else {
-                       channel_request_remote_forwarding(fwd.listen_host,
+                       if (channel_request_remote_forwarding(fwd.listen_host,
                            fwd.listen_port, fwd.connect_host,
-                           fwd.connect_port);
+                           fwd.connect_port) < 0) {
+                               logit("Port forwarding failed.");
+                               goto out;
+                       }
                }
 
                logit("Forwarding port.");
This page took 0.03728 seconds and 4 git commands to generate.