mirror of
https://github.com/samba-team/samba.git
synced 2024-12-28 07:21:54 +03:00
fix connecting to a BDC when the PDC is down but in WINS and no bcast
can be used to find a BDC
This commit is contained in:
parent
4fc06a9e22
commit
e95d8e2c9e
@ -145,6 +145,13 @@ static BOOL cm_rpc_find_dc(const char *domain, struct in_addr *dc_ip, fstring sr
|
||||
|
||||
/* Lookup domain controller name. Try the real PDC first to avoid
|
||||
SAM sync delays */
|
||||
if (get_dc_list(True, domain, &ip_list, &count) &&
|
||||
name_status_find(domain, 0x1c, 0x20, ip_list[0], srv_name)) {
|
||||
*dc_ip = ip_list[0];
|
||||
SAFE_FREE(ip_list);
|
||||
return True;
|
||||
}
|
||||
|
||||
if (!get_dc_list(True, domain, &ip_list, &count)) {
|
||||
if (!get_dc_list(False, domain, &ip_list, &count)) {
|
||||
DEBUG(3, ("Could not look up dc's for domain %s\n", domain));
|
||||
|
Loading…
Reference in New Issue
Block a user