- (djm) [openbsd-compat/fake-rfc2553.c openbsd-compat/fake-rfc2553.h]
return EAI_FAMILY when trying to lookup unsupported address family; from vinschen AT redhat.com
This commit is contained in:
parent
1fc231cbb5
commit
c4657ef181
|
@ -42,6 +42,9 @@
|
||||||
[scp.1]
|
[scp.1]
|
||||||
better description for -i flag:
|
better description for -i flag:
|
||||||
s/RSA authentication/public key authentication/
|
s/RSA authentication/public key authentication/
|
||||||
|
- (djm) [openbsd-compat/fake-rfc2553.c openbsd-compat/fake-rfc2553.h]
|
||||||
|
return EAI_FAMILY when trying to lookup unsupported address family;
|
||||||
|
from vinschen AT redhat.com
|
||||||
|
|
||||||
20080711
|
20080711
|
||||||
- (djm) OpenBSD CVS Sync
|
- (djm) OpenBSD CVS Sync
|
||||||
|
@ -4667,4 +4670,4 @@
|
||||||
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
OpenServer 6 and add osr5bigcrypt support so when someone migrates
|
||||||
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
passwords between UnixWare and OpenServer they will still work. OK dtucker@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.5083 2008/07/14 02:12:52 djm Exp $
|
$Id: ChangeLog,v 1.5084 2008/07/14 11:37:36 djm Exp $
|
||||||
|
|
|
@ -51,6 +51,8 @@ int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
|
||||||
struct hostent *hp;
|
struct hostent *hp;
|
||||||
char tmpserv[16];
|
char tmpserv[16];
|
||||||
|
|
||||||
|
if (sa->sa_family != AF_UNSPEC && sa->sa_family != AF_INET)
|
||||||
|
return (EAI_FAMILY);
|
||||||
if (serv != NULL) {
|
if (serv != NULL) {
|
||||||
snprintf(tmpserv, sizeof(tmpserv), "%d", ntohs(sin->sin_port));
|
snprintf(tmpserv, sizeof(tmpserv), "%d", ntohs(sin->sin_port));
|
||||||
if (strlcpy(serv, tmpserv, servlen) >= servlen)
|
if (strlcpy(serv, tmpserv, servlen) >= servlen)
|
||||||
|
@ -95,6 +97,8 @@ gai_strerror(int err)
|
||||||
return ("memory allocation failure.");
|
return ("memory allocation failure.");
|
||||||
case EAI_NONAME:
|
case EAI_NONAME:
|
||||||
return ("nodename nor servname provided, or not known");
|
return ("nodename nor servname provided, or not known");
|
||||||
|
case EAI_FAMILY:
|
||||||
|
return ("ai_family not supported");
|
||||||
default:
|
default:
|
||||||
return ("unknown/invalid error.");
|
return ("unknown/invalid error.");
|
||||||
}
|
}
|
||||||
|
@ -159,6 +163,9 @@ getaddrinfo(const char *hostname, const char *servname,
|
||||||
u_long addr;
|
u_long addr;
|
||||||
|
|
||||||
port = 0;
|
port = 0;
|
||||||
|
if (hints && hints->ai_family != AF_UNSPEC &&
|
||||||
|
hints->ai_family != AF_INET)
|
||||||
|
return (EAI_FAMILY);
|
||||||
if (servname != NULL) {
|
if (servname != NULL) {
|
||||||
char *cp;
|
char *cp;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: fake-rfc2553.h,v 1.15 2008/06/10 13:52:51 dtucker Exp $ */
|
/* $Id: fake-rfc2553.h,v 1.16 2008/07/14 11:37:37 djm Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2003 Damien Miller. All rights reserved.
|
* Copyright (C) 2000-2003 Damien Miller. All rights reserved.
|
||||||
|
@ -129,6 +129,9 @@ struct sockaddr_in6 {
|
||||||
#ifndef EAI_SYSTEM
|
#ifndef EAI_SYSTEM
|
||||||
# define EAI_SYSTEM (INT_MAX - 4)
|
# define EAI_SYSTEM (INT_MAX - 4)
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef EAI_FAMILY
|
||||||
|
# define EAI_FAMILY (INT_MAX - 5)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRUCT_ADDRINFO
|
#ifndef HAVE_STRUCT_ADDRINFO
|
||||||
struct addrinfo {
|
struct addrinfo {
|
||||||
|
|
Loading…
Reference in New Issue