summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-09-13 20:58:22 +0000
committermav <mav@FreeBSD.org>2015-09-13 20:58:22 +0000
commit7b4b3f9d39aca633245fcaab12bb3aca2c3788f2 (patch)
tree621510735c82319ddb253ddf76105e8bbba92a3f
parent29816fedba6febdd4748f67e462f405be5d25e11 (diff)
downloadFreeBSD-src-7b4b3f9d39aca633245fcaab12bb3aca2c3788f2.zip
FreeBSD-src-7b4b3f9d39aca633245fcaab12bb3aca2c3788f2.tar.gz
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.
-rw-r--r--usr.sbin/ctld/login.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.sbin/ctld/login.c b/usr.sbin/ctld/login.c
index 3e52a6a..72c23ce 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);
OpenPOWER on IntegriCloud