1. If DNS server is invalid, the get_sorted_dc_list() is called with
realm(FQDN) and it fails.
2. On the next step, the get_sorted_dc_list() is called with realm(FQDN) again.
I think "again" is wrong place.
On the 2nd step, get_sorted_dc_list() should be called with realm(WORKGROUP).
if (c_realm && *c_realm)
got_realm = True;
+ again:
+
/* we need to try once with the realm name and fallback to the
netbios domain name if we fail (if netbios has not been disabled */
sitename = sitename_fetch(realm);
- again:
-
DEBUG(6,("ads_find_dc: (cldap) looking for %s '%s'\n",
(got_realm ? "realm" : "domain"), realm));