- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
This commit is contained in:
parent
b062c293e0
commit
62b6b17080
|
@ -4,6 +4,8 @@
|
|||
[monitor.c]
|
||||
unbreak rekeying for privsep; ok millert@
|
||||
- Release 3.6p1
|
||||
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
||||
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
|
||||
|
||||
20030320
|
||||
- (djm) OpenBSD CVS Sync
|
||||
|
@ -1246,4 +1248,4 @@
|
|||
save auth method before monitor_reset_key_state(); bugzilla bug #284;
|
||||
ok provos@
|
||||
|
||||
$Id: ChangeLog,v 1.2639 2003/03/23 22:12:09 djm Exp $
|
||||
$Id: ChangeLog,v 1.2640 2003/03/24 02:35:58 djm Exp $
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "includes.h"
|
||||
#include "ssh.h"
|
||||
|
||||
RCSID("$Id: fake-getaddrinfo.c,v 1.4 2003/02/24 01:35:09 djm Exp $");
|
||||
RCSID("$Id: fake-getaddrinfo.c,v 1.5 2003/03/24 02:35:59 djm Exp $");
|
||||
|
||||
#ifndef HAVE_GAI_STRERROR
|
||||
char *gai_strerror(int ecode)
|
||||
|
@ -71,6 +71,7 @@ int getaddrinfo(const char *hostname, const char *servname,
|
|||
struct in_addr in;
|
||||
int i;
|
||||
long int port;
|
||||
u_long addr;
|
||||
|
||||
port = 0;
|
||||
if (servname != NULL) {
|
||||
|
@ -86,7 +87,10 @@ int getaddrinfo(const char *hostname, const char *servname,
|
|||
}
|
||||
|
||||
if (hints && hints->ai_flags & AI_PASSIVE) {
|
||||
if (NULL != (*res = malloc_ai(port, htonl(0x00000000))))
|
||||
addr = htonl(0x00000000);
|
||||
if (hostname && inet_aton(hostname, &in) != 0)
|
||||
addr = in.s_addr;
|
||||
if (NULL != (*res = malloc_ai(port, addr)))
|
||||
return 0;
|
||||
else
|
||||
return EAI_MEMORY;
|
||||
|
|
Loading…
Reference in New Issue