The Samba-Bugzilla – Attachment 18209 Details for
Bug 15534
smbd does not detect ctdb public ipv6 addresses for multichannel exclusion
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for v4-19-test
bfixes-tmp419.txt (text/plain), 1.92 KB, created by
Stefan Metzmacher
on 2023-12-27 14:33:44 UTC
(
hide
)
Description:
Patch for v4-19-test
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2023-12-27 14:33:44 UTC
Size:
1.92 KB
patch
obsolete
>From 6f2df36d8d7bfe7ba9624cd1065b30ba4fd49477 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Tue, 15 Aug 2023 08:57:57 +0200 >Subject: [PATCH] s3:ctdbd_conn: fix ctdbd_public_ip_foreach() for ipv6 > addresses > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=15534 > >Signed-off-by: Stefan Metzmacher <metze@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> > >Autobuild-User(master): Stefan Metzmacher <metze@samba.org> >Autobuild-Date(master): Thu Dec 21 11:09:30 UTC 2023 on atb-devel-224 > >(cherry picked from commit 828f3c99122fb033ecb79e24ed24821b8510f0f8) >--- > source3/lib/ctdbd_conn.c | 33 ++++++++++++++++++++++++++++----- > 1 file changed, 28 insertions(+), 5 deletions(-) > >diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c >index a739c97f3fd2..3698c9d36724 100644 >--- a/source3/lib/ctdbd_conn.c >+++ b/source3/lib/ctdbd_conn.c >@@ -1438,6 +1438,32 @@ static int ctdbd_control_get_public_ips(struct ctdbd_connection *conn, > return 0; > } > >+static struct samba_sockaddr ctdbd_sock_addr_to_samba(const ctdb_sock_addr *c) >+{ >+ struct samba_sockaddr s = {}; >+ >+ switch (c->sa.sa_family) { >+ case AF_INET: >+ s.u.in = c->ip; >+ break; >+ case AF_INET6: >+ /* >+ * ctdb always requires HAVE_IPV6, >+ * so we don't need an ifdef here. >+ */ >+ s.u.in6 = c->ip6; >+ break; >+ default: >+ /* >+ * ctdb_sock_addr only supports ipv4 and ipv6 >+ */ >+ smb_panic(__location__); >+ break; >+ } >+ >+ return s; >+} >+ > int ctdbd_public_ip_foreach(struct ctdbd_connection *conn, > int (*cb)(uint32_t total_ip_count, > const struct sockaddr_storage *ip, >@@ -1457,11 +1483,8 @@ int ctdbd_public_ip_foreach(struct ctdbd_connection *conn, > } > > for (i=0; i < ips->num; i++) { >- struct samba_sockaddr tmp = { >- .u = { >- .sa = ips->ips[i].addr.sa, >- }, >- }; >+ const ctdb_sock_addr *addr = &ips->ips[i].addr; >+ struct samba_sockaddr tmp = ctdbd_sock_addr_to_samba(addr); > > ret = cb(ips->num, > &tmp.u.ss, >-- >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:
vl
:
review+
Actions:
View
Attachments on
bug 15534
: 18209 |
18210