(fallback_get_hosts): limit the fallback lookups to 5.
Patch from Wesley Craig, umich.edu git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17958 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -422,6 +422,15 @@ fallback_get_hosts(krb5_context context, struct krb5_krbhst_data *kd,
|
|||||||
struct addrinfo hints;
|
struct addrinfo hints;
|
||||||
char portstr[NI_MAXSERV];
|
char portstr[NI_MAXSERV];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Don't try forever in case the DNS server keep returning us
|
||||||
|
* entries (like wildcard entries or the .nu TLD)
|
||||||
|
*/
|
||||||
|
if(kd->fallback_count >= 5) {
|
||||||
|
kd->flags |= KD_FALLBACK;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if(kd->fallback_count == 0)
|
if(kd->fallback_count == 0)
|
||||||
asprintf(&host, "%s.%s.", serv_string, kd->realm);
|
asprintf(&host, "%s.%s.", serv_string, kd->realm);
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user