]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: libsmb: Namecache. Fix bug missed by me in previous cleanup.
authorJeremy Allison <jra@samba.org>
Thu, 16 Jul 2020 22:47:04 +0000 (15:47 -0700)
committerVolker Lendecke <vl@samba.org>
Fri, 17 Jul 2020 05:54:29 +0000 (05:54 +0000)
In ipstr_list_make() we need to look at the correct array entry
to determine the ss_family for the sockaddr_storage.

Otherwise we are always storing the type of the first entry.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jul 17 05:54:31 UTC 2020 on sn-devel-184

source3/libsmb/namecache.c

index 7f5345872630e89bc82eca1648c830d53f8b41ec..fb4a4aac8c8a3f58949a7963c874597c486e5ad2 100644 (file)
@@ -58,7 +58,7 @@ static char *ipstr_list_make(TALLOC_CTX *ctx,
                               sizeof(addr_buf),
                               &ip_list[i].ss);
 
-               if (ip_list->ss.ss_family == AF_INET) {
+               if (ip_list[i].ss.ss_family == AF_INET) {
                        /* IPv4 */
                        new_str = talloc_asprintf(ctx,
                                                  "%s:%d",