Instead of reseting the params to default if they pass it we should reset to max if they pass it. Signed-off-by: Roi Dayan <roid@xxxxxxxxxxxx> --- usr/iscsi/iser_text.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/iscsi/iser_text.c b/usr/iscsi/iser_text.c index 8180dbc..b8c5136 100644 --- a/usr/iscsi/iser_text.c +++ b/usr/iscsi/iser_text.c @@ -342,8 +342,8 @@ static int iser_login_check_params(struct iscsi_connection *iscsi_conn, if (p[i].state == KEY_STATE_START && p[i].val != session_keys[i].def) { if (iscsi_conn->state == STATE_LOGIN) { if (i >= ISCSI_PARAM_FIRST_LOCAL) { - if (p[i].val > session_keys[i].def) - p[i].val = session_keys[i].def; + if (p[i].val > session_keys[i].max) + p[i].val = session_keys[i].max; p[i].state = KEY_STATE_DONE; continue; } -- 1.8.4.3 -- To unsubscribe from this list: send the line "unsubscribe stgt" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html