The Samba-Bugzilla – Attachment 16754 Details for
Bug 14800
bind() fails due to wrong sa_socklen
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for 4.15
0001-util_sock-fix-assignment-of-sa_socklen.patch (text/plain), 1.25 KB, created by
Björn Jacke
on 2021-08-31 10:18:05 UTC
(
hide
)
Description:
patch for 4.15
Filename:
MIME Type:
Creator:
Björn Jacke
Created:
2021-08-31 10:18:05 UTC
Size:
1.25 KB
patch
obsolete
>From 1c367b06fcaee62f8d1fafeb7d6f15993aa277e8 Mon Sep 17 00:00:00 2001 >From: Bjoern Jacke <bj@sernet.de> >Date: Tue, 17 Aug 2021 11:39:24 +0000 >Subject: [PATCH] util_sock: fix assignment of sa_socklen >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Stefan Metzmacher <metze@samba.org> >Reviewed-by: Bjoern Jacke <bjacke@samba.org> >Reviewed-by: Volker Lendecke <vl@samba.org> > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=14800 > >Autobuild-User(master): Björn Jacke <bjacke@samba.org> >Autobuild-Date(master): Tue Aug 31 09:54:35 UTC 2021 on sn-devel-184 > >(cherry picked from commit 1209c89dcf6371bbfa4f3929a47a573ef2916c1a) >--- > source3/lib/util_sock.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > >diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c >index 2dbb572a974..85dc3efbe15 100644 >--- a/source3/lib/util_sock.c >+++ b/source3/lib/util_sock.c >@@ -254,6 +254,15 @@ int open_socket_in( > int val = rebind ? 1 : 0; > bool ok; > >+ switch (addr.u.sa.sa_family) { >+ case AF_INET6: >+ addr.sa_socklen = sizeof(struct sockaddr_in6); >+ break; >+ case AF_INET: >+ addr.sa_socklen = sizeof(struct sockaddr_in); >+ break; >+ } >+ > ok = samba_sockaddr_set_port(&addr, port); > if (!ok) { > ret = -EINVAL; >-- >2.20.2 >
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:
bjacke
:
review+
vl
:
review+
Actions:
View
Attachments on
bug 14800
: 16754