From a3fd63f2239fd3443f61a786e3fa60c2c9d28c6e Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Sat, 21 May 2016 11:26:03 +0000 Subject: [PATCH] Properly reset session state when using proxy and fail_on_disconnection=1. Without it the reconnection would fail due to mismatched sequence numbers. MFC after: 1 month Sponsored by: The FreeBSD Foundation --- sys/dev/iscsi/iscsi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c index d72768ffc3f..86e3fe45091 100644 --- a/sys/dev/iscsi/iscsi.c +++ b/sys/dev/iscsi/iscsi.c @@ -1552,6 +1552,10 @@ iscsi_ioctl_daemon_connect(struct iscsi_softc *sc, } ISCSI_SESSION_LOCK(is); + is->is_statsn = 0; + is->is_cmdsn = 0; + is->is_expcmdsn = 0; + is->is_maxcmdsn = 0; is->is_waiting_for_iscsid = false; is->is_login_phase = true; is->is_timeout = 0;