The iSCSI protocol adds padding to a data packet if the data size is not a multiple of four. The iovector provided by QEMU does not include such padding, and libiscsi then complains that there was a protocol error. This patch fixes this by reading the padding in a separate "recv" system call. These packets anyway do not happen in the data path, where the packet size is a multiple of 512. This fixes QEMU's scsi-generic backend, which triggered the problem when the target sent a 66-byte INQUIRY response. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
14 KiB
14 KiB