diff options
author | Alexander Motin <mav@FreeBSD.org> | 2015-09-13 20:58:22 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2015-09-13 20:58:22 +0000 |
commit | 860d3db9ce55a54b446d0ea7eb39a9fd281a6c53 (patch) | |
tree | 621510735c82319ddb253ddf76105e8bbba92a3f /usr.sbin/ctld/login.c | |
parent | bb978da49309fa6202dc72bf317612e4bbc7c533 (diff) | |
download | src-860d3db9ce55a54b446d0ea7eb39a9fd281a6c53.tar.gz src-860d3db9ce55a54b446d0ea7eb39a9fd281a6c53.zip |
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.
Notes
Notes:
svn path=/head/; revision=287766
Diffstat (limited to 'usr.sbin/ctld/login.c')
-rw-r--r-- | usr.sbin/ctld/login.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.sbin/ctld/login.c b/usr.sbin/ctld/login.c index 3e52a6a2e88f..72c23cebcf64 100644 --- a/usr.sbin/ctld/login.c +++ b/usr.sbin/ctld/login.c @@ -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); |