]> andersk Git - openssh.git/blobdiff - clientloop.c
- stevesk@cvs.openbsd.org 2006/07/22 19:08:54
[openssh.git] / clientloop.c
index c59d573c5a2a55bcbd81d2c21b710c24eef04532..9398dc9897ef3fd4610c9342a8dc29f9985ac74c 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.166 2006/07/08 21:47:12 stevesk 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
 #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"
@@ -996,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.141742 seconds and 4 git commands to generate.