vm-virtio: vhost-user-net: Set the right set of features

The available features are masked with the backend features, therefore
the available features should be the one used when calling into
set_features() API.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf 2019-08-30 11:55:28 -07:00 committed by Rob Bradford
parent bc42420583
commit cdfe576eb1

View File

@ -73,7 +73,7 @@ impl<'a> Net {
// Set features back is required by the vhost crate mechanism, since the
// later vhost call will check if features is filled in master before execution.
vhost_user_net
.set_features(backend_features)
.set_features(avail_features)
.map_err(Error::VhostUserSetFeatures)?;
let mut acked_features = 0;