Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 May 2016 14:59:22 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300212 - head/usr.sbin/iscsid
Message-ID:  <201605191459.u4JExM46095183@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Thu May 19 14:59:21 2016
New Revision: 300212
URL: https://svnweb.freebsd.org/changeset/base/300212

Log:
  When iscsid(8) is running in ICL proxy mode, don't try to send Logout PDUs.
  The kernel already does this for us when we ask it to terminate the session.
  
  MFC after:	1 month
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/usr.sbin/iscsid/discovery.c

Modified: head/usr.sbin/iscsid/discovery.c
==============================================================================
--- head/usr.sbin/iscsid/discovery.c	Thu May 19 14:57:37 2016	(r300211)
+++ head/usr.sbin/iscsid/discovery.c	Thu May 19 14:59:21 2016	(r300212)
@@ -206,6 +206,18 @@ discovery(struct connection *conn)
 	log_debugx("removing temporary discovery session");
 	kernel_remove(conn);
 
+#ifdef ICL_KERNEL_PROXY
+	if (conn->conn_conf.isc_iser == 1) {
+		/*
+		 * If we're going through the proxy, the kernel already
+		 * sent Logout PDU for us and destroyed the session,
+		 * so we can't send anything anymore.
+		 */
+		log_debugx("discovery session done");
+		return;
+	}
+#endif
+
 	log_debugx("discovery done; logging out");
 	request = logout_new_request(conn);
 	pdu_send(request);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605191459.u4JExM46095183>