The Samba-Bugzilla – Attachment 18310 Details for
Bug 15642
winbindd, net ads join and other things don't work on an ipv6 only host
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Patch for v4-20-test
bfixes-tmp420.txt (text/plain), 1.91 KB, created by
Stefan Metzmacher
on 2024-05-29 14:23:06 UTC
(
hide
)
Description:
Patch for v4-20-test
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2024-05-29 14:23:06 UTC
Size:
1.91 KB
patch
obsolete
>From 98ec6b7d25b88977f5ac14616d0d381aa9091579 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Tue, 7 May 2024 14:53:24 +0000 >Subject: [PATCH] s3:libsmb: allow store_cldap_reply() to work with a ipv6 > response > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15642 > >Signed-off-by: Stefan Metzmacher <metze@samba.org> >Reviewed-by: Andrew Bartlett <abartlet@samba.org> > >Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> >Autobuild-Date(master): Fri May 10 01:35:18 UTC 2024 on atb-devel-224 > >(cherry picked from commit 712ffbffc03c7dcd551c1e22815ebe7c0b9b45d2) >--- > source3/libsmb/dsgetdcname.c | 24 +++++++++++++++++++++++- > 1 file changed, 23 insertions(+), 1 deletion(-) > >diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c >index 09a6e6648b42..c82274f07ae9 100644 >--- a/source3/libsmb/dsgetdcname.c >+++ b/source3/libsmb/dsgetdcname.c >@@ -196,7 +196,29 @@ static NTSTATUS store_cldap_reply(TALLOC_CTX *mem_ctx, > /* FIXME */ > r->sockaddr_size = 0x10; /* the w32 winsock addr size */ > r->sockaddr.sockaddr_family = 2; /* AF_INET */ >- r->sockaddr.pdc_ip = talloc_strdup(mem_ctx, addr); >+ if (is_ipaddress_v4(addr)) { >+ r->sockaddr.pdc_ip = talloc_strdup(mem_ctx, addr); >+ if (r->sockaddr.pdc_ip == NULL) { >+ return NT_STATUS_NO_MEMORY; >+ } >+ } else { >+ /* >+ * ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX will >+ * fail with an ipv6 address. >+ * >+ * This matches windows behaviour in the CLDAP >+ * response when NETLOGON_NT_VERSION_5EX_WITH_IP >+ * is used. >+ * >+ * Windows returns the ipv4 address of the ipv6 >+ * server interface and falls back to 127.0.0.1 >+ * if there's no ipv4 address. >+ */ >+ r->sockaddr.pdc_ip = talloc_strdup(mem_ctx, "127.0.0.1"); >+ if (r->sockaddr.pdc_ip == NULL) { >+ return NT_STATUS_NO_MEMORY; >+ } >+ } > > ndr_err = ndr_push_struct_blob(&blob, mem_ctx, r, > (ndr_push_flags_fn_t)ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX); >-- >2.34.1 >
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
Flags:
gd
:
review+
Actions:
View
Attachments on
bug 15642
: 18310 |
18311