diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | openbsd-compat/fake-getaddrinfo.c | 8 |
2 files changed, 9 insertions, 3 deletions
@@ -4,6 +4,8 @@ | |||
4 | [monitor.c] | 4 | [monitor.c] |
5 | unbreak rekeying for privsep; ok millert@ | 5 | unbreak rekeying for privsep; ok millert@ |
6 | - Release 3.6p1 | 6 | - Release 3.6p1 |
7 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. | ||
8 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au | ||
7 | 9 | ||
8 | 20030320 | 10 | 20030320 |
9 | - (djm) OpenBSD CVS Sync | 11 | - (djm) OpenBSD CVS Sync |
@@ -1246,4 +1248,4 @@ | |||
1246 | save auth method before monitor_reset_key_state(); bugzilla bug #284; | 1248 | save auth method before monitor_reset_key_state(); bugzilla bug #284; |
1247 | ok provos@ | 1249 | ok provos@ |
1248 | 1250 | ||
1249 | $Id: ChangeLog,v 1.2639 2003/03/23 22:12:09 djm Exp $ | 1251 | $Id: ChangeLog,v 1.2640 2003/03/24 02:35:58 djm Exp $ |
diff --git a/openbsd-compat/fake-getaddrinfo.c b/openbsd-compat/fake-getaddrinfo.c index e04776606..e63bda970 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.5 2003/03/24 02:35:59 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; |