What are valid iscsi iqn names?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi experts,

I am working on a patch for Targetcli, I have some fix plans, hope can get your suggestions, thanks! The patch want to fix a bug of Targetcli, that is if we leave iSCSI name empty when create
 a iSCSI target like this:

/> iscsi/ create
Invalid iqn wwn: iqn.2003-01.org.linux-iscsi.leap_targetcli.x8664:sn.dd5521da2386
/>

we will see that error above, the reason is, "leap_targetcli" in the target name, this part of the automatic generated has a "_", which will be rejected by the
function "is_valid_wwn(wwn_type, wwn, wwn_list=None)"

This function will judge whether this wwn is valid, it will reject any wwn names has a " " or "_", I think that make sense, but when I read RFC3720, I find that may
be not enough.

In RFC3720, section 3.2.6.2  it's said:

The following characters are used for formatting iSCSI names:
- dash (’-’=U+002d)
- dot (’.’=U+002e)
- colon (’:’=U+003a)

So I assume that, "-", "." and ":" are acceptable in a iqn wwn name, other special characters
like "!","@" and "$" should  be rejected. But I did not see that code in
function "is_valid_wwn(wwn_type, wwn, wwn_list=None)"

I wonder whether I am understanding this right. Hope can get some suggestions from you, If I understand that right, I will write a patch to fix it, that means, add some code lines to
reject characters like "!" and "&".  Thanks!

Another thing is, I find Targetcli will add host name in the automatic generated iSCSI wwn name,
Like :
/> iscsi/ create
Invalid iqn wwn: iqn.2003-01.org.linux-iscsi.leap_targetcli.x8664:sn.dd5521da2386
/>

This part "leap_targetcli" is my host name, which has a "_", I also want to fix this one, shall we change "_" to "-" when handle such a host name or we can remove host name in a automatic generated iSCSI wwn name?

Thanks for your help
BR
Zhu Lingshan

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux