From 1a0897ae100a625976fb54379933a0ddabcfc145 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Thu, 9 Apr 2015 19:05:49 -0700 Subject: [PATCH] pdu.c: silently ignore any SCSI Async Events we receive Just ignore any iSCSI AsyncMsg / SCSI Async Events we receive instead of reconnecting. We can't pass the data back to the application anyway with the current API. Signed-off-by: Ronnie Sahlberg --- lib/pdu.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/pdu.c b/lib/pdu.c index d6b09ca..be20990 100644 --- a/lib/pdu.c +++ b/lib/pdu.c @@ -428,6 +428,15 @@ iscsi_process_pdu(struct iscsi_context *iscsi, struct iscsi_in_pdu *in) uint16_t param2 = scsi_get_uint16(&in->hdr[40]); uint16_t param3 = scsi_get_uint16(&in->hdr[42]); switch (event) { + case 0x0: + /* Just ignore these ones for now. It could be + * a UNIT_ATTENTION for some changes on the + * target but we don't have an API to pass this on + * to the application yet. + */ + ISCSI_LOG(iscsi, 2, "Ignoring received iSCSI AsyncMsg/" + "SCSI Async Event"); + return 0; case 0x1: ISCSI_LOG(iscsi, 2, "target requests logout within %u seconds", param3); /* this is an ugly workaround for DELL Equallogic FW 7.x bugs: