diff options
Diffstat (limited to 'usr.sbin/iscsid/discovery.c')
-rw-r--r-- | usr.sbin/iscsid/discovery.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/usr.sbin/iscsid/discovery.c b/usr.sbin/iscsid/discovery.c index f5a0f668134a..d31a15b62913 100644 --- a/usr.sbin/iscsid/discovery.c +++ b/usr.sbin/iscsid/discovery.c @@ -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); |