-/* $OpenBSD: asr.c,v 1.45 2015/10/03 22:35:30 deraadt Exp $ */
+/* $OpenBSD: asr.c,v 1.46 2015/10/07 13:59:34 deraadt Exp $ */
/*
* Copyright (c) 2010-2012 Eric Faurot <eric@openbsd.org>
*
return (ac);
}
+struct asr_ctx *
+_asr_no_resolver(void)
+{
+ return asr_ctx_create();
+}
+
/*
* Add a search domain to the async context.
*/
-/* $OpenBSD: asr_private.h,v 1.34 2015/10/03 22:35:30 deraadt Exp $ */
+/* $OpenBSD: asr_private.h,v 1.35 2015/10/07 13:59:34 deraadt Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
static void *_asr_resolver(void);
void _asr_resolver_done(void *);
struct asr_ctx *_asr_use_resolver(void *);
+struct asr_ctx *_asr_no_resolver(void);
void _asr_ctx_unref(struct asr_ctx *);
struct asr_query *_asr_async_new(struct asr_ctx *, int);
void _asr_async_free(struct asr_query *);
-/* $OpenBSD: getaddrinfo_async.c,v 1.45 2015/09/20 14:19:21 eric Exp $ */
+/* $OpenBSD: getaddrinfo_async.c,v 1.46 2015/10/07 13:59:34 deraadt Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
struct asr_query *as;
char alias[MAXDNAME];
- ac = _asr_use_resolver(asr);
+ if ((hints->ai_flags & AI_NUMERICHOST) == 0)
+ ac = _asr_use_resolver(asr);
+ else
+ ac = _asr_no_resolver();
if ((as = _asr_async_new(ac, ASR_GETADDRINFO)) == NULL)
goto abort; /* errno set */
as->as_run = getaddrinfo_async_run;