Commit b9ae0b0b authored by Mike Hibler's avatar Mike Hibler

Ensure that IQN we produce does not include '_'.

We create the IQN from pid/eid/vname and at least the last can have
an underscore in it. We convert any of these to dashes.
parent 239038ad
......@@ -5061,6 +5061,16 @@ sendstoreconf(int sock, int tcp, tmcdreq_t *reqp, char *bscmd, char *vname,
return 1;
}
/*
* XXX FreeNAS does not like '_' in its IQNs,
* so change them to '-'.
*/
if (strchr(iqn, '_') != NULL) {
char *cp = iqn;
while ((cp = strchr(cp, '_')) != NULL)
*cp++ = '-';
}
bufp = buf;
bufp += OUTPUT(bufp, ebufp-bufp,
"%s CLASS=%s PROTO=%s UUID=%s UUID_TYPE=iqn",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment