Received: from eggs.gnu.org ([2001:4830:134:3::10]:40767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3QQw-0001v0-NA for qemu-devel@nongnu.org; Mon, 30 Nov 2015 10:32:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3QQt-0005WO-Hr for qemu-devel@nongnu.org; Mon, 30 Nov 2015 10:32:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3QQt-0005W6-D3 for qemu-devel@nongnu.org; Mon, 30 Nov 2015 10:32:03 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 3014268E03 for ; Mon, 30 Nov 2015 15:32:02 +0000 (UTC) Received: from pendragon.usersys.redhat.com (dhcp131-91.brq.redhat.com [10.34.131.91]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAUFW0GE025295 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 30 Nov 2015 10:32:01 -0500 From: Pino Toscano Date: Mon, 30 Nov 2015 16:31:41 +0100 Message-ID: <2757099.oMy77gOrqp@pendragon.usersys.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3856204.XH1hlgEd95"; micalg="pgp-sha256"; protocol="application/pgp-signature" Subject: [Qemu-devel] iSCSI options for IQN with colons List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --nextPart3856204.XH1hlgEd95 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Hi, while testing the integration of QEMU with iSCSI, I was setting up an environment with both target and initiator IQNs with colons. Then I tried to connect to two different targets using two different initiator= IQN, like the following: $ qemu ... \ -iscsi id=3Diqn.2015-11.com.bla:suffix1,initiator-name=3Diqn.2015= =2D11.com.bla:suffix1-initiator \ -iscsi id=3Diqn.2015-11.com.bla:suffix2,initiator-name=3Diqn.2015= =2D11.com.bla:suffix2-initiator \ -drive file=3Discsi://server/iqn.2015-11.com.bla%3Asuffix1/0,form= at=3Draw,id=3Dhd1,if=3Dnone \ -drive file=3Discsi://server/iqn.2015-11.com.bla%3Asuffix2/0,form= at=3Draw,id=3Dhd2,if=3Dnone \ ... which didn't work at first: qemu-system-x86_64: -iscsi id=3Diqn.2015-11.com.bla:suffix1,initiator= =2Dname=3Diqn.2015-11.com.bla:suffix1-initiator: Parameter 'id' expects a= n identifier which, according to id_wellformed in id.c, is true. Allowing colons in id=3D... like in the following patch diff --git a/util/id.c b/util/id.c index bcc64d8..25fca9d 100644 =2D-- a/util/id.c +++ b/util/id.c @@ -20,7 +20,7 @@ bool id_wellformed(const char *id) return false; } for (i =3D 1; id[i]; i++) { =2D if (!qemu_isalnum(id[i]) && !strchr("-._", id[i])) { + if (!qemu_isalnum(id[i]) && !strchr("-._:", id[i])) { return false; } } allowed me to work run QEMU with the attached disks. The question basically boils down to whether it is right to reject colons in id: =2D if so, then there should be a way to allow them only in id of -iscsi (since colons can be part of IQNs) =2D if not, whether allowing them could cause regressions in option parsing Thanks, =2D-=20 Pino Toscano --nextPart3856204.XH1hlgEd95 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWXGvjAAoJEMPRTC2YZDfNR/gQAKnMMX12xAG6eMMdIsrSPMbx 3mYhNWZRgMeLZnMwwmcJCo61uL2zfmmNxj/Dc5H+4yGk5jAzr2DJJjUDmhGor2/q XlH8K5jWwNBu2210mUd5a0KkLqwGlxeXXBWAwkreQ5kTSVD5vuP8Kx31MV6KNvca m5YIkUU22cwacf5sr5E5KEHKNKUSM3RmiAGaHJmsLaw+VD5WMgNsM9nh2x3XdYmh D6MAdXl8sXWLwdsmqW7OUxoFoTNDjtATADwMiUmRc9KUtcrr1G+eMA4T5hhrt6Fw wCr1OkOdlxpS0xpj/Zu+zmcvSHDPvFxwC+lxSOHEI4kN/sKP/wVqUYMUEfJPyMMc 5YrAdq8lZaY++D0+bPdgXnT2R+CJCutT7ATXZrtBVJFAs+4heTNRg8eFpixIsTDd oJX9RnKxdeofrrxA+nsFSNpfGrKrXP7WzgKaJaEpYbLb9BUrVqwecQ2ggGkMGdy2 DHm8y5t6YGn5TrAzPmu6CY+GFVyFxHPddaRyDfgAan0G8ejbDLgRdY4CMkDRBYbb Biv7k5oubTDhMHoKGKFsjerh660c3s3+di21d01a2V87vQ5UYu64egHv0oBfHjSt QhQ7X0E2pzF76SVGnD/HVCkoH1aDamc9GhE23OLfXQFwiWxlU0pSn0bf3ByXKRJO 1ZMekdtsjuepbXxjvn5p =3vkw -----END PGP SIGNATURE----- --nextPart3856204.XH1hlgEd95--