[Pkg-iscsi-maintainers] [SCM] Debian Open-iSCSI Packaging branch, upstream-mnc, updated. 2.0-872-193-gde2c0e7
Mike Christie
michaelc at cs.wisc.edu
Sat Apr 7 15:44:08 UTC 2012
The following commit has been merged in the upstream-mnc branch:
commit f0eacd5e1c5691f75799c3396af66337aba5f401
Author: Mike Christie <michaelc at cs.wisc.edu>
Date: Wed Mar 7 21:24:26 2012 -0600
iscsi tools: fix hostname with port handling
If you pass iscsiadm a hostname:port then it will not parse the port
out of the argument. You then end up with a hostname as "hostname:port"
with the default port.
diff --git a/usr/iscsi_util.c b/usr/iscsi_util.c
index 270e585..19d28f8 100644
--- a/usr/iscsi_util.c
+++ b/usr/iscsi_util.c
@@ -90,13 +90,16 @@ str_to_ipport(char *str, int *port, int *tpgt)
if (!strchr(ip, '.')) {
if (*ip == '[') {
+ /* IPv6 with [] */
if (!(sport = strchr(ip, ']')))
return NULL;
*sport++ = '\0';
ip++;
str = sport;
- } else
+ } else if (!strchr(ip, ':'))
+ /* IPv6 no brackets and no port */
sport = NULL;
+ /* else hostname with domain info */
}
if (sport && (sport = strchr(str, ':'))) {
--
Debian Open-iSCSI Packaging
More information about the Pkg-iscsi-maintainers
mailing list