From b457470c65a41938a1b6be511020e9c7945886be Mon Sep 17 00:00:00 2001 From: Justin M. Forbes Date: Oct 15 2015 14:44:35 +0000 Subject: Fix for iscsi target issues (#rhbz 1271812) --- diff --git a/iscsi-target-Avoid-OFMarker-IFMarker-negotiation.patch b/iscsi-target-Avoid-OFMarker-IFMarker-negotiation.patch new file mode 100644 index 0000000..36533f5 --- /dev/null +++ b/iscsi-target-Avoid-OFMarker-IFMarker-negotiation.patch @@ -0,0 +1,59 @@ +From 673681cafa99776e334c3e61cafa2cf115950c32 Mon Sep 17 00:00:00 2001 +From: Nicholas Bellinger +Date: Tue, 22 Sep 2015 22:32:14 -0700 +Subject: [PATCH] iscsi-target: Avoid OFMarker + IFMarker negotiation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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ć +Bisected-by: Christophe Vu-Brugier +Tested-by: Christophe Vu-Brugier +Signed-off-by: Nicholas Bellinger +--- + drivers/target/iscsi/iscsi_target_parameters.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c +index e8a52f7..51d1734 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) + TYPERANGE_UTF8, USE_INITIAL_ONLY); + if (!param) + goto out; ++ + /* + * Extra parameters for ISER from RFC-5046 + */ +@@ -496,9 +497,9 @@ int iscsi_set_keys_to_negotiate( + } else if (!strcmp(param->name, SESSIONTYPE)) { + SET_PSTATE_NEGOTIATE(param); + } else if (!strcmp(param->name, IFMARKER)) { +- SET_PSTATE_NEGOTIATE(param); ++ SET_PSTATE_REJECT(param); + } else if (!strcmp(param->name, OFMARKER)) { +- SET_PSTATE_NEGOTIATE(param); ++ SET_PSTATE_REJECT(param); + } else if (!strcmp(param->name, IFMARKINT)) { + SET_PSTATE_REJECT(param); + } else if (!strcmp(param->name, OFMARKINT)) { +-- +2.4.3 + diff --git a/kernel.spec b/kernel.spec index 87c536a..46cef8a 100644 --- a/kernel.spec +++ b/kernel.spec @@ -634,6 +634,9 @@ Patch537: si2157-Bounds-check-firmware.patch #rhbz 1268037 Patch538: ALSA-hda-Add-dock-support-for-ThinkPad-T550.patch +#rhbz 1271812 +Patch539: iscsi-target-Avoid-OFMarker-IFMarker-negotiation.patch + # END OF PATCH DEFINITIONS %endif @@ -2078,6 +2081,9 @@ fi # # %changelog +* Thu Oct 15 2015 Justin M. Forbes +- Fix for iscsi target issues (#rhbz 1271812) + * Wed Oct 07 2015 Josh Boyer - Increase the default number of runtime UARTS (rhbz 1264383)