diff options
Diffstat (limited to 'canohost.c')
-rw-r--r-- | canohost.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/canohost.c b/canohost.c index 2345cc35c..8270500d3 100644 --- a/canohost.c +++ b/canohost.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: canohost.c,v 1.61 2006/08/03 03:34:41 deraadt Exp $ */ | 1 | /* $OpenBSD: canohost.c,v 1.62 2007/12/27 14:22:08 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -32,6 +32,7 @@ | |||
32 | #include "packet.h" | 32 | #include "packet.h" |
33 | #include "log.h" | 33 | #include "log.h" |
34 | #include "canohost.h" | 34 | #include "canohost.h" |
35 | #include "misc.h" | ||
35 | 36 | ||
36 | static void check_ip_options(int, char *); | 37 | static void check_ip_options(int, char *); |
37 | 38 | ||
@@ -271,7 +272,7 @@ get_socket_address(int sock, int remote, int flags) | |||
271 | if ((r = getnameinfo((struct sockaddr *)&addr, addrlen, ntop, | 272 | if ((r = getnameinfo((struct sockaddr *)&addr, addrlen, ntop, |
272 | sizeof(ntop), NULL, 0, flags)) != 0) { | 273 | sizeof(ntop), NULL, 0, flags)) != 0) { |
273 | error("get_socket_address: getnameinfo %d failed: %s", flags, | 274 | error("get_socket_address: getnameinfo %d failed: %s", flags, |
274 | r == EAI_SYSTEM ? strerror(errno) : gai_strerror(r)); | 275 | ssh_gai_strerror(r)); |
275 | return NULL; | 276 | return NULL; |
276 | } | 277 | } |
277 | return xstrdup(ntop); | 278 | return xstrdup(ntop); |
@@ -372,7 +373,7 @@ get_sock_port(int sock, int local) | |||
372 | if ((r = getnameinfo((struct sockaddr *)&from, fromlen, NULL, 0, | 373 | if ((r = getnameinfo((struct sockaddr *)&from, fromlen, NULL, 0, |
373 | strport, sizeof(strport), NI_NUMERICSERV)) != 0) | 374 | strport, sizeof(strport), NI_NUMERICSERV)) != 0) |
374 | fatal("get_sock_port: getnameinfo NI_NUMERICSERV failed: %s", | 375 | fatal("get_sock_port: getnameinfo NI_NUMERICSERV failed: %s", |
375 | r == EAI_SYSTEM ? strerror(errno) : gai_strerror(r)); | 376 | ssh_gai_strerror(r)); |
376 | return atoi(strport); | 377 | return atoi(strport); |
377 | } | 378 | } |
378 | 379 | ||