52c8eca
diff -up openssh-6.1p1/sshconnect2.c.canohost openssh-6.1p1/sshconnect2.c
52c8eca
--- openssh-6.1p1/sshconnect2.c.canohost	2012-10-30 10:52:59.593301692 +0100
52c8eca
+++ openssh-6.1p1/sshconnect2.c	2012-10-30 11:01:12.870301632 +0100
52c8eca
@@ -699,12 +699,15 @@ userauth_gssapi(Authctxt *authctxt)
Jan F 003cb0b
 	static u_int mech = 0;
Jan F 003cb0b
 	OM_uint32 min;
Jan F 003cb0b
 	int ok = 0;
Jan F 003cb0b
-	const char *gss_host;
Jan F 003cb0b
+	const char *gss_host = NULL;
Jan F 003cb0b
 
Jan F 003cb0b
 	if (options.gss_server_identity)
Jan F 003cb0b
 		gss_host = options.gss_server_identity;
52c8eca
-	else if (options.gss_trust_dns)
52c8eca
+	else if (options.gss_trust_dns) {
Jan F 003cb0b
 		gss_host = get_canonical_hostname(1);
Jan F 003cb0b
+		if ( strcmp( gss_host, "UNKNOWN" )  == 0 )
Jan F 003cb0b
+			gss_host = authctxt->host;
Jan F 003cb0b
+	}
52c8eca
 	else
52c8eca
 		gss_host = authctxt->host;
Jan F 003cb0b