b875ab
diff -up openssh-5.6p1/channels.c.getaddrinfo openssh-5.6p1/channels.c
b875ab
--- openssh-5.6p1/channels.c.getaddrinfo	2012-02-14 16:12:54.427852524 +0100
b875ab
+++ openssh-5.6p1/channels.c	2012-02-14 16:13:22.818928690 +0100
b875ab
@@ -3275,6 +3275,9 @@ x11_create_display_inet(int x11_display_
b875ab
 		memset(&hints, 0, sizeof(hints));
b875ab
 		hints.ai_family = IPv4or6;
b875ab
 		hints.ai_flags = x11_use_localhost ? 0: AI_PASSIVE;
b875ab
+#ifdef AI_ADDRCONFIG
b875ab
+		hints.ai_flags |= AI_ADDRCONFIG;
b875ab
+#endif
b875ab
 		hints.ai_socktype = SOCK_STREAM;
b875ab
 		snprintf(strport, sizeof strport, "%d", port);
b875ab
 		if ((gaierr = getaddrinfo(NULL, strport, &hints, &aitop)) != 0) {
b875ab
diff -up openssh-5.6p1/sshconnect.c.getaddrinfo openssh-5.6p1/sshconnect.c
b875ab
--- openssh-5.6p1/sshconnect.c.getaddrinfo	2012-02-14 16:09:25.057964291 +0100
b875ab
+++ openssh-5.6p1/sshconnect.c	2012-02-14 16:09:25.106047007 +0100
b875ab
@@ -343,6 +343,7 @@ ssh_connect(const char *host, struct soc
Jan F 9c4d06
 	memset(&hints, 0, sizeof(hints));
Jan F 9c4d06
 	hints.ai_family = family;
Jan F 9c4d06
 	hints.ai_socktype = SOCK_STREAM;
Jan F 9c4d06
+	hints.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG;
Jan F 9c4d06
 	snprintf(strport, sizeof strport, "%u", port);
Jan F 9c4d06
 	if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0)
Jan F 9c4d06
 		fatal("%s: Could not resolve hostname %.100s: %s", __progname,