diff options
author | mav <mav@FreeBSD.org> | 2015-10-05 09:16:01 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-10-05 09:16:01 +0000 |
commit | 048cd8404d87cd4d5247350bbfb96bff36d07044 (patch) | |
tree | 8f7ef0ed82ec381aadf823050cf2c1fc6f836ab7 | |
parent | cada85b67a825920c3c7760628bccfb0db6c0876 (diff) | |
download | FreeBSD-src-048cd8404d87cd4d5247350bbfb96bff36d07044.zip FreeBSD-src-048cd8404d87cd4d5247350bbfb96bff36d07044.tar.gz |
MFC r287766: 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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.sbin/ctld/login.c b/usr.sbin/ctld/login.c index 88e8436..6ef0e61 100644 --- a/usr.sbin/ctld/login.c +++ b/usr.sbin/ctld/login.c @@ -601,6 +601,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); |