mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-21 07:21:15 +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)?;
|
self.set_config(&hdr, size, &buf)?;
|
||||||
}
|
}
|
||||||
MasterReq::SET_SLAVE_REQ_FD => {
|
MasterReq::SET_SLAVE_REQ_FD => {
|
||||||
if self.acked_protocol_features & VhostUserProtocolFeatures::SLAVE_SEND_FD.bits()
|
if self.acked_protocol_features & VhostUserProtocolFeatures::SLAVE_REQ.bits() == 0 {
|
||||||
== 0
|
|
||||||
{
|
|
||||||
return Err(Error::InvalidOperation);
|
return Err(Error::InvalidOperation);
|
||||||
}
|
}
|
||||||
self.set_slave_req_fd(&hdr, rfds)?;
|
self.set_slave_req_fd(&hdr, rfds)?;
|
||||||
|
Loading…
Reference in New Issue
Block a user