[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-121-gf109f82

Jeremy Allison jra at samba.org
Fri Oct 26 02:14:02 GMT 2007


The branch, v3-2-test has been updated
       via  f109f82622ca30ae2360e8300152e90b9587ffd8 (commit)
      from  e6609cab732d5cd5cc9a5ae50aee15147f2ec6ec (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit f109f82622ca30ae2360e8300152e90b9587ffd8
Author: Jeremy Allison <jra at samba.org>
Date:   Thu Oct 25 19:07:25 2007 -0700

    Fix bug in writing names into gencache
    as well as 2 typos where AF_INET6 was mistypes as AF_INET.
    JERRY YOU NEED THESE FIXES.
    Fixes smbclient -L localhost -U%
    Bugs reported by Kukks (thanks kukks).
    Jeremy.

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

Summary of changes:
 source/lib/interface.c |    8 --------
 source/lib/util_sock.c |    4 ++--
 source/lib/util_str.c  |    7 ++++---
 3 files changed, 6 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/interface.c b/source/lib/interface.c
index 9d073bc..9627bf6 100644
--- a/source/lib/interface.c
+++ b/source/lib/interface.c
@@ -100,14 +100,6 @@ void setup_linklocal_scope_id(struct sockaddr_storage *pss)
 			return;
 		}
 	}
-	for (i=local_interfaces;i;i=i->next) {
-		if (same_net(pss, &i->ip, &i->netmask)) {
-			struct sockaddr_in6 *psa6 =
-				(struct sockaddr_in6 *)pss;
-			psa6->sin6_scope_id = if_nametoindex(i->name);
-			return;
-		}
-	}
 }
 #endif
 
diff --git a/source/lib/util_sock.c b/source/lib/util_sock.c
index c30f21e..80d4af8 100644
--- a/source/lib/util_sock.c
+++ b/source/lib/util_sock.c
@@ -234,7 +234,7 @@ bool is_loopback_ip_v4(struct in_addr ip)
 bool is_loopback_addr(const struct sockaddr_storage *pss)
 {
 #if defined(HAVE_IPV6)
-	if (pss->ss_family == AF_INET) {
+	if (pss->ss_family == AF_INET6) {
 		struct in6_addr *pin6 =
 			&((struct sockaddr_in6 *)pss)->sin6_addr;
 		return IN6_IS_ADDR_LOOPBACK(pin6);
@@ -265,7 +265,7 @@ bool is_zero_ip_v4(struct in_addr ip)
 bool is_zero_addr(const struct sockaddr_storage *pss)
 {
 #if defined(HAVE_IPV6)
-	if (pss->ss_family == AF_INET) {
+	if (pss->ss_family == AF_INET6) {
 		struct in6_addr *pin6 =
 			&((struct sockaddr_in6 *)pss)->sin6_addr;
 		return IN6_IS_ADDR_UNSPECIFIED(pin6);
diff --git a/source/lib/util_str.c b/source/lib/util_str.c
index 226bf82..1f3aab3 100644
--- a/source/lib/util_str.c
+++ b/source/lib/util_str.c
@@ -2280,11 +2280,12 @@ static char *ipstr_list_add(char **ipstr_list, const struct ip_service *service)
 		return NULL;
 	}
 
+	print_sockaddr(addr_buf,
+			sizeof(addr_buf),
+			&service->ss);
+
 	/* attempt to convert ip to a string and append colon separator to it */
 	if (*ipstr_list) {
-		print_sockaddr(addr_buf,
-				sizeof(addr_buf),
-				&service->ss);
 		if (service->ss.ss_family == AF_INET) {
 			/* IPv4 */
 			asprintf(&new_ipstr, "%s%s%s:%d",


-- 
Samba Shared Repository


More information about the samba-cvs mailing list