lib: properly pass through NOP-In data segment
data_pos corresponds to the data_segment_length (+ padding), so should always be passed to the NOP-In callback if greater than zero. Fixes: https://github.com/sahlberg/libiscsi/issues/278 Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
@@ -163,7 +163,7 @@ iscsi_process_nop_out_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu,
|
|||||||
data.data = NULL;
|
data.data = NULL;
|
||||||
data.size = 0;
|
data.size = 0;
|
||||||
|
|
||||||
if (in->data_pos > ISCSI_HEADER_SIZE) {
|
if (in->data_pos) {
|
||||||
data.data = in->data;
|
data.data = in->data;
|
||||||
data.size = in->data_pos;
|
data.size = in->data_pos;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user