The branch, master has been updated
       via  1209c89dcf6 util_sock: fix assignment of sa_socklen
      from  638c6d423e7 selftest: Remove skip of samba4.rpc.unixinfo

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 1209c89dcf6371bbfa4f3929a47a573ef2916c1a
Author: Bjoern Jacke <b...@sernet.de>
Date:   Tue Aug 17 11:39:24 2021 +0000

    util_sock: fix assignment of sa_socklen
    
    Signed-off-by: Stefan Metzmacher <me...@samba.org>
    Reviewed-by: Bjoern Jacke <bja...@samba.org>
    Reviewed-by: Volker Lendecke <v...@samba.org>
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14800
    
    Autobuild-User(master): Björn Jacke <bja...@samba.org>
    Autobuild-Date(master): Tue Aug 31 09:54:35 UTC 2021 on sn-devel-184

-----------------------------------------------------------------------

Summary of changes:
 source3/lib/util_sock.c | 9 +++++++++
 1 file changed, 9 insertions(+)


Changeset truncated at 500 lines:

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;


-- 
Samba Shared Repository

Reply via email to