The Samba-Bugzilla – Attachment 17630 Details for
Bug 15226
samba-tool gpo listall fails IPv6 only - finddcs() fails to find DC when there is only an AAAA record for the DC in DNS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for bug attached
samba-finddcs-only-aaaa-in-dns-fix.patch (text/plain), 1.97 KB, created by
Matthew Grant
on 2022-11-07 05:17:40 UTC
(
hide
)
Description:
Patch for bug attached
Filename:
MIME Type:
Creator:
Matthew Grant
Created:
2022-11-07 05:17:40 UTC
Size:
1.97 KB
patch
obsolete
>diff --git a/source4/libcli/resolve/dns_ex.c b/source4/libcli/resolve/dns_ex.c >index 0bb3ba02287..0525d0d019a 100644 >--- a/source4/libcli/resolve/dns_ex.c >+++ b/source4/libcli/resolve/dns_ex.c >@@ -81,7 +81,7 @@ struct dns_records_container { > uint32_t count; > }; > >-static int reply_to_addrs(TALLOC_CTX *mem_ctx, uint32_t *a_num, >+static int reply_to_addrs(TALLOC_CTX *mem_ctx, uint32_t *addr_num, > char ***cur_addrs, uint32_t total, > struct dns_request *reply, int port) > { >@@ -151,8 +151,8 @@ static int reply_to_addrs(TALLOC_CTX *mem_ctx, uint32_t *a_num, > rr->name->pLabelList->label); > if (addrs[total]) { > total++; >- if (rr->type == QTYPE_A) { >- (*a_num)++; >+ if (rr->type == QTYPE_A || rr->type == QTYPE_AAAA) { >+ (*addr_num)++; > } > } > } >@@ -211,7 +211,7 @@ static struct dns_records_container get_a_aaaa_records(TALLOC_CTX *mem_ctx, > struct dns_request *reply; > struct dns_records_container ret; > char **addrs = NULL; >- uint32_t a_num, total; >+ uint32_t addr_num, total; > uint16_t qtype; > TALLOC_CTX *tmp_ctx; > DNS_ERROR err; >@@ -236,12 +236,13 @@ static struct dns_records_container get_a_aaaa_records(TALLOC_CTX *mem_ctx, > } > } > >- a_num = total = 0; >- total = reply_to_addrs(tmp_ctx, &a_num, &addrs, total, reply, port); >+ addr_num = total = 0; >+ total = reply_to_addrs(tmp_ctx, &addr_num, &addrs, total, reply, port); > >- if (qtype == QTYPE_AAAA && a_num == 0) { >+ if (qtype == QTYPE_AAAA && addr_num == 0) { > /* >- * DNS server didn't returned A when asked for AAAA records. >+ * DNS server didn't returned A when asked for AAAA records, >+ * and no AAAA record returned either > * Most of the server do it, let's ask for A specificaly. > */ > err = dns_lookup(tmp_ctx, name, QTYPE_A, &reply); >@@ -249,7 +250,7 @@ static struct dns_records_container get_a_aaaa_records(TALLOC_CTX *mem_ctx, > goto done; > } > >- total = reply_to_addrs(tmp_ctx, &a_num, &addrs, total, >+ total = reply_to_addrs(tmp_ctx, &addr_num, &addrs, total, > reply, port); > > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 15226
:
17630
|
17637
|
17638
|
17642