From 7bc8b37f0e768efc06bc1cc2e55c544f84d89de0 Mon Sep 17 00:00:00 2001 From: claudio Date: Sun, 20 Apr 2014 20:12:31 +0000 Subject: [PATCH] After doing all of the loging dance to get the target's params it makes sense to merge them into the active set. At least that way we run with the right params and finally do reads and writes that are > 8k. --- usr.sbin/iscsid/connection.c | 3 ++- usr.sbin/iscsid/session.c | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/usr.sbin/iscsid/connection.c b/usr.sbin/iscsid/connection.c index d01250015b5..b8555a23a3c 100644 --- a/usr.sbin/iscsid/connection.c +++ b/usr.sbin/iscsid/connection.c @@ -1,4 +1,4 @@ -/* $OpenBSD: connection.c,v 1.15 2014/04/20 18:17:12 claudio Exp $ */ +/* $OpenBSD: connection.c,v 1.16 2014/04/20 20:12:31 claudio Exp $ */ /* * Copyright (c) 2009 Claudio Jeker @@ -449,6 +449,7 @@ c_do_login(struct connection *c, enum c_event ev) int c_do_loggedin(struct connection *c, enum c_event ev) { + iscsi_merge_conn_params(&c->active, &c->mine, &c->his); session_fsm(c->session, SESS_EV_CONN_LOGGED_IN, c); return CONN_LOGGED_IN; diff --git a/usr.sbin/iscsid/session.c b/usr.sbin/iscsid/session.c index d58f53a0e95..2ec59b603be 100644 --- a/usr.sbin/iscsid/session.c +++ b/usr.sbin/iscsid/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.5 2014/04/20 16:52:11 claudio Exp $ */ +/* $OpenBSD: session.c,v 1.6 2014/04/20 20:12:31 claudio Exp $ */ /* * Copyright (c) 2011 Claudio Jeker @@ -297,10 +297,13 @@ sess_do_conn_loggedin(struct session *s, struct sessev *sev) if (s->state & SESS_LOGGED_IN) return SESS_LOGGED_IN; - if (s->config.SessionType == SESSION_TYPE_DISCOVERY) + if (s->config.SessionType == SESSION_TYPE_DISCOVERY) { initiator_discovery(s); - else - vscsi_event(VSCSI_REQPROBE, s->target, -1); + return SESS_LOGGED_IN; + } + + iscsi_merge_sess_params(&s->active, &s->mine, &s->his); + vscsi_event(VSCSI_REQPROBE, s->target, -1); return SESS_LOGGED_IN; } -- 2.20.1