Re: [PATCH] iser: fix local conn params being reset to default

Or Gerlitz <[email protected]> Wed, 29 Oct 2014 07:51:59 +0200
Newsgroups org.kernel.vger.stgt
Message-ID <[email protected]>
On 10/28/2014 5:41 PM, Roi Dayan wrote:
> Instead of reseting the params to default if they pass it
> we should reset to max if they pass it.

who are they? can you remind me what are the local params?

Or.

>
> Signed-off-by: Roi Dayan <[email protected]>
> ---
>   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;
>   				}