aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2015-09-23 01:32:14 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2015-09-25 02:24:46 -0400
commit673681cafa99776e334c3e61cafa2cf115950c32 (patch)
treed6a0f8fb99b66d652ae408aca48707b9b2608268 /drivers/target
parent8fa3a867486f85df66eba8c4df85804d3309c6ad (diff)
iscsi-target: Avoid OFMarker + IFMarker negotiation
This patch fixes a v4.2+ regression introduced by commit c04a6091 that removed support for obsolete sync-and-steering markers usage as originally defined in RFC-3720. The regression would involve attempting to send OFMarker=No + IFMarker=No keys during opertional negotiation login phase, including when initiators did not actually propose these keys. The result for MSFT iSCSI initiators would be random junk in TCP stream after the last successful login request was been sent signaling the move to full feature phase (FFP) operation. To address this bug, go ahead and avoid negotiating these keys by default unless the initiator explicitly proposes them, but still respond to them with 'No' if they are proposed. Reported-by: Dragan Milivojević <galileo@pkm-inc.com> Bisected-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm> Tested-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/iscsi/iscsi_target_parameters.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c
index e8a52f7d6204..51d1734d5390 100644
--- a/drivers/target/iscsi/iscsi_target_parameters.c
+++ b/drivers/target/iscsi/iscsi_target_parameters.c
@@ -407,6 +407,7 @@ int iscsi_create_default_params(struct iscsi_param_list **param_list_ptr)
407 TYPERANGE_UTF8, USE_INITIAL_ONLY); 407 TYPERANGE_UTF8, USE_INITIAL_ONLY);
408 if (!param) 408 if (!param)
409 goto out; 409 goto out;
410
410 /* 411 /*
411 * Extra parameters for ISER from RFC-5046 412 * Extra parameters for ISER from RFC-5046
412 */ 413 */
@@ -496,9 +497,9 @@ int iscsi_set_keys_to_negotiate(
496 } else if (!strcmp(param->name, SESSIONTYPE)) { 497 } else if (!strcmp(param->name, SESSIONTYPE)) {
497 SET_PSTATE_NEGOTIATE(param); 498 SET_PSTATE_NEGOTIATE(param);
498 } else if (!strcmp(param->name, IFMARKER)) { 499 } else if (!strcmp(param->name, IFMARKER)) {
499 SET_PSTATE_NEGOTIATE(param); 500 SET_PSTATE_REJECT(param);
500 } else if (!strcmp(param->name, OFMARKER)) { 501 } else if (!strcmp(param->name, OFMARKER)) {
501 SET_PSTATE_NEGOTIATE(param); 502 SET_PSTATE_REJECT(param);
502 } else if (!strcmp(param->name, IFMARKINT)) { 503 } else if (!strcmp(param->name, IFMARKINT)) {
503 SET_PSTATE_REJECT(param); 504 SET_PSTATE_REJECT(param);
504 } else if (!strcmp(param->name, OFMARKINT)) { 505 } else if (!strcmp(param->name, OFMARKINT)) {