diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ssh.c | 14 |
2 files changed, 11 insertions, 8 deletions
@@ -7,6 +7,9 @@ | |||
7 | - djm@cvs.openbsd.org 2005/06/18 04:30:36 | 7 | - djm@cvs.openbsd.org 2005/06/18 04:30:36 |
8 | [ssh.c ssh_config.5] | 8 | [ssh.c ssh_config.5] |
9 | allow ControlPath=none, patch from dwmw2 AT infradead.org; ok dtucker@ | 9 | allow ControlPath=none, patch from dwmw2 AT infradead.org; ok dtucker@ |
10 | - djm@cvs.openbsd.org 2005/06/25 22:47:49 | ||
11 | [ssh.c] | ||
12 | do the default port filling code a few lines earlier, so it really does fix %p | ||
10 | 13 | ||
11 | 20050618 | 14 | 20050618 |
12 | - (djm) OpenBSD CVS Sync | 15 | - (djm) OpenBSD CVS Sync |
@@ -2759,4 +2762,4 @@ | |||
2759 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM | 2762 | - (djm) Trim deprecated options from INSTALL. Mention UsePAM |
2760 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu | 2763 | - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu |
2761 | 2764 | ||
2762 | $Id: ChangeLog,v 1.3829 2005/06/25 22:56:03 djm Exp $ | 2765 | $Id: ChangeLog,v 1.3830 2005/06/25 22:56:31 djm Exp $ |
@@ -40,7 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include "includes.h" | 42 | #include "includes.h" |
43 | RCSID("$OpenBSD: ssh.c,v 1.245 2005/06/18 04:30:36 djm Exp $"); | 43 | RCSID("$OpenBSD: ssh.c,v 1.246 2005/06/25 22:47:49 djm Exp $"); |
44 | 44 | ||
45 | #include <openssl/evp.h> | 45 | #include <openssl/evp.h> |
46 | #include <openssl/err.h> | 46 | #include <openssl/err.h> |
@@ -607,6 +607,12 @@ again: | |||
607 | *p = tolower(*p); | 607 | *p = tolower(*p); |
608 | } | 608 | } |
609 | 609 | ||
610 | /* Get default port if port has not been set. */ | ||
611 | if (options.port == 0) { | ||
612 | sp = getservbyname(SSH_SERVICE_NAME, "tcp"); | ||
613 | options.port = sp ? ntohs(sp->s_port) : SSH_DEFAULT_PORT; | ||
614 | } | ||
615 | |||
610 | if (options.proxy_command != NULL && | 616 | if (options.proxy_command != NULL && |
611 | strcmp(options.proxy_command, "none") == 0) | 617 | strcmp(options.proxy_command, "none") == 0) |
612 | options.proxy_command = NULL; | 618 | options.proxy_command = NULL; |
@@ -627,12 +633,6 @@ again: | |||
627 | if (options.control_path != NULL) | 633 | if (options.control_path != NULL) |
628 | control_client(options.control_path); | 634 | control_client(options.control_path); |
629 | 635 | ||
630 | /* Get default port if port has not been set. */ | ||
631 | if (options.port == 0) { | ||
632 | sp = getservbyname(SSH_SERVICE_NAME, "tcp"); | ||
633 | options.port = sp ? ntohs(sp->s_port) : SSH_DEFAULT_PORT; | ||
634 | } | ||
635 | |||
636 | /* Open a connection to the remote host. */ | 636 | /* Open a connection to the remote host. */ |
637 | if (ssh_connect(host, &hostaddr, options.port, | 637 | if (ssh_connect(host, &hostaddr, options.port, |
638 | options.address_family, options.connection_attempts, | 638 | options.address_family, options.connection_attempts, |