[stgt] [PATCH] Fix IPv6 discovery by stripping Zone ID
    Lee Duncan 
    lduncan at suse.com
       
    Tue Mar  5 00:15:57 CET 2013
    
    
  
This strips off the "%ZONEID" that can be at the end of IPv6
addresses returned by getnameinfo(). Without this, IPv6 discovery
fails because the address has something like "%eth0" appended to it.
Signed of by: Lee Duncan <lduncan at suse.com>
---
 usr/iscsi/iscsid.c |    4 ++++
 1 file changed, 4 insertions(+)
diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
index 9614001..b10be1d 100644
--- a/usr/iscsi/iscsid.c
+++ b/usr/iscsi/iscsid.c
@@ -871,6 +871,10 @@ static void text_scan_text(struct iscsi_connection *conn)
 				continue;
 			}
 
+			/* strip zone id */
+			if (ss.ss_family == AF_INET6)
+				(void) strsep(&p, "%");
+
 			p = buf + strlen(buf);
 
 			if (ss.ss_family == AF_INET6)
-- 
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
    
    
More information about the stgt
mailing list