summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hessler <phessler@cvs.openbsd.org>2009-06-09 18:15:09 +0000
committerPeter Hessler <phessler@cvs.openbsd.org>2009-06-09 18:15:09 +0000
commit1b3c567ed32ec4e6b123132675d9530ac5d3b81d (patch)
tree716d3b1ae634aaefa2895af8346f3a2e2f76dd86
parent8a5e65ede27946f15ac60ea739e5c5fe1a2016d6 (diff)
Update to handle the default resolv order behavior.
Add a note that the regress depends on the "family" keyword in resolv.conf OK millert@, deraadt@
-rw-r--r--regress/lib/libc/getaddrinfo/answer32
-rw-r--r--regress/lib/libc/getaddrinfo/gaitest.c9
2 files changed, 24 insertions, 17 deletions
diff --git a/regress/lib/libc/getaddrinfo/answer b/regress/lib/libc/getaddrinfo/answer
index fa4985958ff..c99048adcb7 100644
--- a/regress/lib/libc/getaddrinfo/answer
+++ b/regress/lib/libc/getaddrinfo/answer
@@ -4,15 +4,15 @@ ai1: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv 80
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv http
ai1: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 80
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv http
-ai1: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv 80
-ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 80
+ai1: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 80
+ai2: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv 80
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host ::1 serv tftp
ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv 69
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv tftp
ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 69
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv tftp
-ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv 69
-ai2: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 69
+ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 69
+ai2: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv 69
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host ::1 serv echo
ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv 7
ai2: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv 7
@@ -20,10 +20,10 @@ arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv echo
ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 7
ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 7
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv echo
-ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv 7
-ai2: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 7
-ai3: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv 7
-ai4: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 7
+ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 7
+ai2: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv 7
+ai3: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 7
+ai4: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv 7
== specific address family
arg: flags 0x2 family 2 socktype 0 protocol 0 addrlen 0 host localhost serv http
@@ -73,20 +73,20 @@ arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host 127.0.0.1 serv (emp
ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 0
ai2: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 0
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host localhost serv (empty)
-ai1: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv 0
-ai2: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 0
-ai3: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv 0
-ai4: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 0
+ai1: flags 0x2 family 2 socktype 2 protocol 17 addrlen 16 host 127.0.0.1 serv 0
+ai2: flags 0x2 family 24 socktype 2 protocol 17 addrlen 28 host ::1 serv 0
+ai3: flags 0x2 family 2 socktype 1 protocol 6 addrlen 16 host 127.0.0.1 serv 0
+ai4: flags 0x2 family 24 socktype 1 protocol 6 addrlen 28 host ::1 serv 0
arg: flags 0x2 family 0 socktype 0 protocol 0 addrlen 0 host (empty) serv (empty)
name or service is not known
== sock_raw
arg: flags 0x2 family 0 socktype 3 protocol 0 addrlen 0 host localhost serv (empty)
-ai1: flags 0x2 family 24 socktype 3 protocol 0 addrlen 28 host ::1 serv 0
-ai2: flags 0x2 family 2 socktype 3 protocol 0 addrlen 16 host 127.0.0.1 serv 0
+ai1: flags 0x2 family 2 socktype 3 protocol 0 addrlen 16 host 127.0.0.1 serv 0
+ai2: flags 0x2 family 24 socktype 3 protocol 0 addrlen 28 host ::1 serv 0
arg: flags 0x2 family 0 socktype 3 protocol 59 addrlen 0 host localhost serv (empty)
-ai1: flags 0x2 family 24 socktype 3 protocol 59 addrlen 28 host ::1 serv 0
-ai2: flags 0x2 family 2 socktype 3 protocol 59 addrlen 16 host 127.0.0.1 serv 0
+ai1: flags 0x2 family 2 socktype 3 protocol 59 addrlen 16 host 127.0.0.1 serv 0
+ai2: flags 0x2 family 24 socktype 3 protocol 59 addrlen 28 host ::1 serv 0
arg: flags 0x2 family 0 socktype 3 protocol 59 addrlen 0 host localhost serv 80
service not supported for ai_socktype
arg: flags 0x2 family 0 socktype 3 protocol 59 addrlen 0 host localhost serv www
diff --git a/regress/lib/libc/getaddrinfo/gaitest.c b/regress/lib/libc/getaddrinfo/gaitest.c
index 059c1aaa1ae..12a44984599 100644
--- a/regress/lib/libc/getaddrinfo/gaitest.c
+++ b/regress/lib/libc/getaddrinfo/gaitest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gaitest.c,v 1.5 2004/06/21 21:56:19 itojun Exp $ */
+/* $OpenBSD: gaitest.c,v 1.6 2009/06/09 18:15:08 phessler Exp $ */
/* $NetBSD: gaitest.c,v 1.3 2002/07/05 15:47:43 itojun Exp $ */
/*
@@ -30,6 +30,13 @@
* SUCH DAMAGE.
*/
+/*
+ * Please note: the order of the responses (and the regress test)
+ * is dependent on the "family" keywords in resolv.conf.
+ *
+ * This expects the default behaviour of "family inet4 inet6"
+ */
+
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>