diff options
Diffstat (limited to 'sshconnect.c')
-rw-r--r-- | sshconnect.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sshconnect.c b/sshconnect.c index cbbe54821..92f0f3800 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -13,7 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include "includes.h" | 15 | #include "includes.h" |
16 | RCSID("$OpenBSD: sshconnect.c,v 1.165 2005/06/17 02:44:33 djm Exp $"); | 16 | RCSID("$OpenBSD: sshconnect.c,v 1.166 2005/06/17 22:53:47 djm Exp $"); |
17 | 17 | ||
18 | #include <openssl/bn.h> | 18 | #include <openssl/bn.h> |
19 | 19 | ||
@@ -289,18 +289,9 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr, | |||
289 | int sock = -1, attempt; | 289 | int sock = -1, attempt; |
290 | char ntop[NI_MAXHOST], strport[NI_MAXSERV]; | 290 | char ntop[NI_MAXHOST], strport[NI_MAXSERV]; |
291 | struct addrinfo hints, *ai, *aitop; | 291 | struct addrinfo hints, *ai, *aitop; |
292 | struct servent *sp; | ||
293 | 292 | ||
294 | debug2("ssh_connect: needpriv %d", needpriv); | 293 | debug2("ssh_connect: needpriv %d", needpriv); |
295 | 294 | ||
296 | /* Get default port if port has not been set. */ | ||
297 | if (port == 0) { | ||
298 | sp = getservbyname(SSH_SERVICE_NAME, "tcp"); | ||
299 | if (sp) | ||
300 | port = ntohs(sp->s_port); | ||
301 | else | ||
302 | port = SSH_DEFAULT_PORT; | ||
303 | } | ||
304 | /* If a proxy command is given, connect using it. */ | 295 | /* If a proxy command is given, connect using it. */ |
305 | if (proxy_command != NULL) | 296 | if (proxy_command != NULL) |
306 | return ssh_proxy_connect(host, port, proxy_command); | 297 | return ssh_proxy_connect(host, port, proxy_command); |