From d8d790bb7bf5a724de383011015b0a543d2ba875 Mon Sep 17 00:00:00 2001 From: Sergio Lopez Date: Fri, 21 Feb 2020 12:49:03 +0100 Subject: [PATCH] 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 --- vhost_rs/src/vhost_user/slave_req_handler.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/vhost_rs/src/vhost_user/slave_req_handler.rs b/vhost_rs/src/vhost_user/slave_req_handler.rs index 50b8414db..f3b0770f7 100644 --- a/vhost_rs/src/vhost_user/slave_req_handler.rs +++ b/vhost_rs/src/vhost_user/slave_req_handler.rs @@ -278,9 +278,7 @@ impl SlaveReqHandler { 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)?;