diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | openbsd-compat/fake-getaddrinfo.c | 8 |
2 files changed, 9 insertions, 3 deletions
@@ -6,6 +6,8 @@ | |||
6 | srp@srparish.net, help from djm | 6 | srp@srparish.net, help from djm |
7 | - (djm) Fix getpeerid support for 64 bit BE systems. From | 7 | - (djm) Fix getpeerid support for 64 bit BE systems. From |
8 | Arnd Bergmann <arndb@de.ibm.com> | 8 | Arnd Bergmann <arndb@de.ibm.com> |
9 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. | ||
10 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au | ||
9 | - Release 3.6p1 | 11 | - Release 3.6p1 |
10 | 12 | ||
11 | 20030324 | 13 | 20030324 |
@@ -1256,4 +1258,4 @@ | |||
1256 | save auth method before monitor_reset_key_state(); bugzilla bug #284; | 1258 | save auth method before monitor_reset_key_state(); bugzilla bug #284; |
1257 | ok provos@ | 1259 | ok provos@ |
1258 | 1260 | ||
1259 | $Id: ChangeLog,v 1.2633.2.8 2003/03/26 05:02:47 djm Exp $ | 1261 | $Id: ChangeLog,v 1.2633.2.9 2003/03/26 05:03:05 djm Exp $ |
diff --git a/openbsd-compat/fake-getaddrinfo.c b/openbsd-compat/fake-getaddrinfo.c index e04776606..bc58f30a6 100644 --- a/openbsd-compat/fake-getaddrinfo.c +++ b/openbsd-compat/fake-getaddrinfo.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include "includes.h" | 12 | #include "includes.h" |
13 | #include "ssh.h" | 13 | #include "ssh.h" |
14 | 14 | ||
15 | RCSID("$Id: fake-getaddrinfo.c,v 1.4 2003/02/24 01:35:09 djm Exp $"); | 15 | RCSID("$Id: fake-getaddrinfo.c,v 1.4.2.1 2003/03/26 05:03:06 djm Exp $"); |
16 | 16 | ||
17 | #ifndef HAVE_GAI_STRERROR | 17 | #ifndef HAVE_GAI_STRERROR |
18 | char *gai_strerror(int ecode) | 18 | char *gai_strerror(int ecode) |
@@ -71,6 +71,7 @@ int getaddrinfo(const char *hostname, const char *servname, | |||
71 | struct in_addr in; | 71 | struct in_addr in; |
72 | int i; | 72 | int i; |
73 | long int port; | 73 | long int port; |
74 | u_long addr; | ||
74 | 75 | ||
75 | port = 0; | 76 | port = 0; |
76 | if (servname != NULL) { | 77 | if (servname != NULL) { |
@@ -86,7 +87,10 @@ int getaddrinfo(const char *hostname, const char *servname, | |||
86 | } | 87 | } |
87 | 88 | ||
88 | if (hints && hints->ai_flags & AI_PASSIVE) { | 89 | if (hints && hints->ai_flags & AI_PASSIVE) { |
89 | if (NULL != (*res = malloc_ai(port, htonl(0x00000000)))) | 90 | addr = htonl(0x00000000); |
91 | if (hostname && inet_aton(hostname, &in) != 0) | ||
92 | addr = in.s_addr; | ||
93 | if (NULL != (*res = malloc_ai(port, addr))) | ||
90 | return 0; | 94 | return 0; |
91 | else | 95 | else |
92 | return EAI_MEMORY; | 96 | return EAI_MEMORY; |