Module Name: src
Committed By: mlelstv
Date: Sun Mar 4 07:37:43 UTC 2018
Modified Files:
src/sys/dev/iscsi: iscsi_rcv.c
Log Message:
Add sanity check.
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/iscsi/iscsi_rcv.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/iscsi/iscsi_rcv.c
diff -u src/sys/dev/iscsi/iscsi_rcv.c:1.24 src/sys/dev/iscsi/iscsi_rcv.c:1.25
--- src/sys/dev/iscsi/iscsi_rcv.c:1.24 Sun Dec 3 19:07:10 2017
+++ src/sys/dev/iscsi/iscsi_rcv.c Sun Mar 4 07:37:43 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: iscsi_rcv.c,v 1.24 2017/12/03 19:07:10 christos Exp $ */
+/* $NetBSD: iscsi_rcv.c,v 1.25 2018/03/04 07:37:43 mlelstv Exp $ */
/*-
* Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -737,6 +737,11 @@ receive_command_response_pdu(connection_
return -1;
}
+ if (req_ccb->ccb_flags & CCBF_COMPLETE) {
+ DEBOUT(("Possibly duplicate command response (tagged as COMPLETE)\n"));
+ return -1;
+ }
+
if (req_ccb->ccb_pdu_waiting != NULL) {
ccb_timeout_start(req_ccb, COMMAND_TIMEOUT);
req_ccb->ccb_num_timeouts = 0;