]> andersk Git - openssh.git/commitdiff
- djm@cvs.openbsd.org 2005/06/25 22:47:49
authordjm <djm>
Sat, 25 Jun 2005 22:56:31 +0000 (22:56 +0000)
committerdjm <djm>
Sat, 25 Jun 2005 22:56:31 +0000 (22:56 +0000)
     [ssh.c]
     do the default port filling code a few lines earlier, so it really
     does fix %p

ChangeLog
ssh.c

index 471cef81942158c4c07cfed0c6d4d9298bac678d..4321e232e95dd04179eb872f8db8e3a6c030fbe3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,9 @@
    - djm@cvs.openbsd.org 2005/06/18 04:30:36
      [ssh.c ssh_config.5]
      allow ControlPath=none, patch from dwmw2 AT infradead.org; ok dtucker@
+   - djm@cvs.openbsd.org 2005/06/25 22:47:49
+     [ssh.c]
+     do the default port filling code a few lines earlier, so it really does fix %p
 
 20050618
  - (djm) OpenBSD CVS Sync
diff --git a/ssh.c b/ssh.c
index 91f8559de0edabba46d4d174af67e90b5c80d8c2..67af53e69cf0f6e7705561466d7fb708ea36b720 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -40,7 +40,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.245 2005/06/18 04:30:36 djm Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.246 2005/06/25 22:47:49 djm Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/err.h>
@@ -607,6 +607,12 @@ again:
                                *p = tolower(*p);
        }
 
+       /* Get default port if port has not been set. */
+       if (options.port == 0) {
+               sp = getservbyname(SSH_SERVICE_NAME, "tcp");
+               options.port = sp ? ntohs(sp->s_port) : SSH_DEFAULT_PORT;
+       }
+
        if (options.proxy_command != NULL &&
            strcmp(options.proxy_command, "none") == 0)
                options.proxy_command = NULL;
@@ -627,12 +633,6 @@ again:
        if (options.control_path != NULL)
                control_client(options.control_path);
 
-       /* Get default port if port has not been set. */
-       if (options.port == 0) {
-               sp = getservbyname(SSH_SERVICE_NAME, "tcp");
-               options.port = sp ? ntohs(sp->s_port) : SSH_DEFAULT_PORT;
-       }
-
        /* Open a connection to the remote host. */
        if (ssh_connect(host, &hostaddr, options.port,
            options.address_family, options.connection_attempts,
This page took 0.05206 seconds and 5 git commands to generate.