[SCM] Samba Shared Repository - branch master updated

[email protected] (Bj??rn Jacke)
Newsgroups gmane.network.samba.cvs
Message-ID <[email protected]>
The branch, master has been updated
       via  44a01a2 util: use SCOPE_DELIMITER for the IPv6 scope delimiter
       via  bfc6adf replace: make sure we have a SCOPE_DELIMITER define
      from  ab8616f ad/provision: change http://samba.org to https://www.samba.org

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


- Log -----------------------------------------------------------------
commit 44a01a2d3d15923e14516d5a9ffd195e6fe41e8b
Author: Björn Jacke <[email protected]>
Date:   Thu Dec 8 17:53:43 2016 +0100

    util: use SCOPE_DELIMITER for the IPv6 scope delimiter
    
    Signed-off-by: Bjoern Jacke <[email protected]>
    Reviewed-by: Stefan Metzmacher <[email protected]>
    
    Autobuild-User(master): Björn Jacke <[email protected]>
    Autobuild-Date(master): Fri Dec  9 20:45:15 CET 2016 on sn-devel-144

commit bfc6adfb20d208e994f1b203237dca320b9901d4
Author: Björn Jacke <[email protected]>
Date:   Thu Dec 8 17:56:24 2016 +0100

    replace: make sure we have a SCOPE_DELIMITER define
    
    Signed-off-by: Bjoern Jacke <[email protected]>
    Reviewed-by: Stefan Metzmacher <[email protected]>

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

Summary of changes:
 lib/replace/system/network.h | 4 ++++
 lib/util/util_net.c          | 8 ++++----
 2 files changed, 8 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/system/network.h b/lib/replace/system/network.h
index 4a3fd07..8254551 100644
--- a/lib/replace/system/network.h
+++ b/lib/replace/system/network.h
@@ -365,4 +365,8 @@ struct addrinfo {
 #endif /* HAVE_LINUX_IPV6_V6ONLY_26 */
 #endif /* HAVE_IPV6 */
 
+#ifndef SCOPE_DELIMITER
+#define SCOPE_DELIMITER '%'
+#endif
+
 #endif
diff --git a/lib/util/util_net.c b/lib/util/util_net.c
index cb238ad..cbc836c 100644
--- a/lib/util/util_net.c
+++ b/lib/util/util_net.c
@@ -86,7 +86,7 @@ static char *normalize_ipv6_literal(const char *str, char *buf, size_t *_len)
 			cnt_delimiter += 1;
 			break;
 		case 's':
-			buf[i] = '%';
+			buf[i] = SCOPE_DELIMITER;
 			idx_chars += 1;
 			break;
 		case '0':
@@ -131,7 +131,7 @@ static char *normalize_ipv6_literal(const char *str, char *buf, size_t *_len)
 
 	for (; idx_chars != 0 && i < len; i++) {
 		switch (str[i]) {
-		case '%':
+		case SCOPE_DELIMITER:
 		case ':':
 			return NULL;
 		default:
@@ -185,7 +185,7 @@ bool interpret_string_addr_internal(struct addrinfo **ppres,
 	}
 
 	if (strchr_m(str, ':')) {
-		char *p = strchr_m(str, '%');
+		char *p = strchr_m(str, SCOPE_DELIMITER);
 
 		/*
 		 * Cope with link-local.
@@ -502,7 +502,7 @@ bool is_ipaddress_v6(const char *str)
 		unsigned int idx = 0;
 		struct in6_addr ip6;
 
-		p = strchr_m(str, '%');
+		p = strchr_m(str, SCOPE_DELIMITER);
 		if (p && (p > str)) {
 			len = PTR_DIFF(p, str);
 			idxs = p + 1;


-- 
Samba Shared Repository
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.