summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2015-02-08 04:50:32 +0000
committerreyk <reyk@openbsd.org>2015-02-08 04:50:32 +0000
commitea230c8952c8779e05f7f8553bc4dec7c9e982a7 (patch)
tree35f8872c72c17c3060dd7a59eb89c4cd101e1ff6
parentOnly attach cpu-based sensors on the primary cpu, for two reasons (diff)
downloadwireguard-openbsd-ea230c8952c8779e05f7f8553bc4dec7c9e982a7.tar.xz
wireguard-openbsd-ea230c8952c8779e05f7f8553bc4dec7c9e982a7.zip
Use AI_ADDRCONFIG when resolv hosts on startup.
OK henning@
-rw-r--r--sbin/iked/parse.y3
-rw-r--r--usr.sbin/httpd/parse.y3
-rw-r--r--usr.sbin/relayd/parse.y3
-rw-r--r--usr.sbin/smtpd/parse.y3
-rw-r--r--usr.sbin/snmpd/parse.y3
5 files changed, 10 insertions, 5 deletions
diff --git a/sbin/iked/parse.y b/sbin/iked/parse.y
index 6f65b50ace7..fbf5b29f5b9 100644
--- a/sbin/iked/parse.y
+++ b/sbin/iked/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.45 2015/01/19 14:42:42 mikeb Exp $ */
+/* $OpenBSD: parse.y,v 1.46 2015/02/08 04:50:32 reyk Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -1831,6 +1831,7 @@ host_dns(const char *s, int mask)
bzero(&hints, sizeof(struct addrinfo));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_ADDRCONFIG;
error = getaddrinfo(s, NULL, &hints, &res0);
if (error)
return (NULL);
diff --git a/usr.sbin/httpd/parse.y b/usr.sbin/httpd/parse.y
index 6596c2a09df..51f7d980209 100644
--- a/usr.sbin/httpd/parse.y
+++ b/usr.sbin/httpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.63 2015/02/08 00:00:59 reyk Exp $ */
+/* $OpenBSD: parse.y,v 1.64 2015/02/08 04:50:32 reyk Exp $ */
/*
* Copyright (c) 2007 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -1694,6 +1694,7 @@ host_dns(const char *s, struct addresslist *al, int max,
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM; /* DUMMY */
+ hints.ai_flags = AI_ADDRCONFIG;
error = getaddrinfo(s, NULL, &hints, &res0);
if (error == EAI_AGAIN || error == EAI_NODATA || error == EAI_NONAME)
return (0);
diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y
index 9605c8d41dd..2b58e87ba36 100644
--- a/usr.sbin/relayd/parse.y
+++ b/usr.sbin/relayd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.202 2015/01/22 17:42:09 reyk Exp $ */
+/* $OpenBSD: parse.y,v 1.203 2015/02/08 04:50:32 reyk Exp $ */
/*
* Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -2889,6 +2889,7 @@ host_dns(const char *s, struct addresslist *al, int max,
bzero(&hints, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM; /* DUMMY */
+ hints.ai_flags = AI_ADDRCONFIG;
error = getaddrinfo(s, NULL, &hints, &res0);
if (error == EAI_AGAIN || error == EAI_NODATA || error == EAI_NONAME)
return (0);
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y
index 4135e018911..e6a45a4c257 100644
--- a/usr.sbin/smtpd/parse.y
+++ b/usr.sbin/smtpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.151 2015/01/20 17:37:54 deraadt Exp $ */
+/* $OpenBSD: parse.y,v 1.152 2015/02/08 04:50:32 reyk Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -2003,6 +2003,7 @@ host_dns(struct listenerlist *al, struct listen_opts *lo)
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
+ hints.ai_flags = AI_ADDRCONFIG;
error = getaddrinfo(lo->ifx, NULL, &hints, &res0);
if (error == EAI_AGAIN || error == EAI_NODATA || error == EAI_NONAME)
return (0);
diff --git a/usr.sbin/snmpd/parse.y b/usr.sbin/snmpd/parse.y
index ca1ea106860..d3d3fbba19e 100644
--- a/usr.sbin/snmpd/parse.y
+++ b/usr.sbin/snmpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.36 2014/11/20 05:51:21 jsg Exp $ */
+/* $OpenBSD: parse.y,v 1.37 2015/02/08 04:50:32 reyk Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
@@ -1154,6 +1154,7 @@ host_dns(const char *s, struct addresslist *al, int max,
bzero(&hints, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM; /* DUMMY */
+ hints.ai_flags = AI_ADDRCONFIG;
error = getaddrinfo(s, NULL, &hints, &res0);
if (error == EAI_AGAIN || error == EAI_NODATA || error == EAI_NONAME)
return (0);