mirror of
https://github.com/samba-team/samba.git
synced 2025-07-31 20:22:15 +03:00
s3: libsmb/namequery: fallback to returning all dcs, when none is available in the requested site
It could happen that all dcs in a site are unavailable
(some sites have only one dc) and then we need to fallback
to get all dcs.
metze
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit c127367b1d
)
This commit is contained in:
@ -2098,6 +2098,15 @@ NTSTATUS get_sorted_dc_list( const char *domain,
|
||||
|
||||
status = get_dc_list(domain, sitename, ip_list,
|
||||
count, lookup_type, &ordered);
|
||||
if (NT_STATUS_EQUAL(status, NT_STATUS_NO_LOGON_SERVERS)
|
||||
&& sitename) {
|
||||
DEBUG(3,("get_sorted_dc_list: no server for name %s available"
|
||||
" in site %s, fallback to all servers\n",
|
||||
domain, sitename));
|
||||
status = get_dc_list(domain, NULL, ip_list,
|
||||
count, lookup_type, &ordered);
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
SAFE_FREE(*ip_list);
|
||||
*count = 0;
|
||||
|
Reference in New Issue
Block a user