Add negotiation of iSCSIProtocolLevel to 2 (RFC7144).

We may need to pass negotiated value to kernel level, but so far it is
not necessary, since it does not use any new features without request.
This commit is contained in:
Alexander Motin 2015-09-13 20:58:22 +00:00
parent bb978da493
commit 860d3db9ce
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=287766

View File

@ -602,6 +602,11 @@ login_negotiate_key(struct pdu *request, const char *name,
keys_add(response_keys, name, "No");
} else if (strcmp(name, "IFMarker") == 0) {
keys_add(response_keys, name, "No");
} else if (strcmp(name, "iSCSIProtocolLevel") == 0) {
tmp = strtoul(value, NULL, 10);
if (tmp > 2)
tmp = 2;
keys_add_int(response_keys, name, tmp);
} else {
log_debugx("unknown key \"%s\"; responding "
"with NotUnderstood", name);