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