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