mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 03:12:27 +00:00
vhost_rs: Don't check for SLAVE_SEND_FD on SET_SLAVE_REQ_FD
SLAVE_SEND_FD and SLAVE_REQ are different protocol features. Check for SLAVE_REQ instead. Signed-off-by: Sergio Lopez <slp@redhat.com>
This commit is contained in:
parent
1c5562b656
commit
d8d790bb7b
@ -278,9 +278,7 @@ impl<S: VhostUserSlaveReqHandler> SlaveReqHandler<S> {
|
||||
self.set_config(&hdr, size, &buf)?;
|
||||
}
|
||||
MasterReq::SET_SLAVE_REQ_FD => {
|
||||
if self.acked_protocol_features & VhostUserProtocolFeatures::SLAVE_SEND_FD.bits()
|
||||
== 0
|
||||
{
|
||||
if self.acked_protocol_features & VhostUserProtocolFeatures::SLAVE_REQ.bits() == 0 {
|
||||
return Err(Error::InvalidOperation);
|
||||
}
|
||||
self.set_slave_req_fd(&hdr, rfds)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user