layers to decide. The request could be AI_NUMERICHOST. [And the process
could be tame()-constrained to not open /etc/resolv.conf]
ok eric guenther
-/* $OpenBSD: getaddrinfo.c,v 1.6 2015/09/14 07:38:37 guenther Exp $ */
+/* $OpenBSD: getaddrinfo.c,v 1.7 2015/10/07 13:57:12 deraadt Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
struct asr_result ar;
int saved_errno = errno;
- res_init();
+ if ((hints->ai_flags & AI_NUMERICHOST) == 0)
+ res_init();
as = getaddrinfo_async(hostname, servname, hints, NULL);
if (as == NULL) {