sync with OpenBSD -current
This commit is contained in:
parent
1abf3d5d6c
commit
10cf24ada0
40 changed files with 462 additions and 489 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: getaddrinfo_async.c,v 1.60 2023/11/20 12:15:16 florian Exp $ */
|
||||
/* $OpenBSD: getaddrinfo_async.c,v 1.61 2023/11/21 15:26:56 florian Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
|
||||
*
|
||||
|
@ -115,7 +115,7 @@ getaddrinfo_async_run(struct asr_query *as, struct asr_result *ar)
|
|||
char fqdn[MAXDNAME];
|
||||
const char *str;
|
||||
struct addrinfo *ai;
|
||||
int i, family, r, is_localhost;
|
||||
int i, family, r, is_localhost = 0;
|
||||
FILE *f;
|
||||
union {
|
||||
struct sockaddr sa;
|
||||
|
@ -228,7 +228,8 @@ getaddrinfo_async_run(struct asr_query *as, struct asr_result *ar)
|
|||
|
||||
ar->ar_gai_errno = 0;
|
||||
|
||||
is_localhost = _asr_is_localhost(as->as.ai.hostname);
|
||||
if (!(ai->ai_flags & AI_NUMERICHOST))
|
||||
is_localhost = _asr_is_localhost(as->as.ai.hostname);
|
||||
/*
|
||||
* If hostname is NULL, "localhost" or falls within the
|
||||
* ".localhost." domain, use local address.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: gethostnamadr_async.c,v 1.48 2023/11/20 12:15:16 florian Exp $ */
|
||||
/* $OpenBSD: gethostnamadr_async.c,v 1.49 2023/11/22 13:19:31 florian Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
|
||||
*
|
||||
|
@ -205,7 +205,8 @@ gethostnamadr_async_run(struct asr_query *as, struct asr_result *ar)
|
|||
}
|
||||
|
||||
if (!hnok_lenient(as->as.hostnamadr.name)) {
|
||||
ar->ar_gai_errno = EAI_FAIL;
|
||||
ar->ar_h_errno = NETDB_INTERNAL;
|
||||
ar->ar_errno = EINVAL;
|
||||
async_set_state(as, ASR_STATE_HALT);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue