summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2013-04-19 15:11:15 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2013-05-03 13:53:46 +0200
commit7873df408dd44eb92840b108211d5aa5db7db526 (patch)
tree12de6b0b78bd8ef7ccef5ae489e475a5dd42a617 /net
parentc963530a5b3e3e0f7304841adfe84416d82f59f6 (diff)
downloadqemu-7873df408dd44eb92840b108211d5aa5db7db526.tar.gz
qemu-7873df408dd44eb92840b108211d5aa5db7db526.tar.bz2
qemu-7873df408dd44eb92840b108211d5aa5db7db526.zip
tap: properly initialize vhostfds
Only tap->vhostfd were checked net_init_tap_one(), but tap->vhostfds were forgot, this will lead qemu to ignore all fds passed by management through vhostfds, and tries to create vhost_net device itself. Fix by adding this check also. Reportyed-by: Michal Privoznik <mprivozn@redhat.com> Cc: Michal Privoznik <mprivozn@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/tap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tap.c b/net/tap.c
index 17bdf014a9..e0b7a2a5a0 100644
--- a/net/tap.c
+++ b/net/tap.c
@@ -623,7 +623,7 @@ static int net_init_tap_one(const NetdevTapOptions *tap, NetClientState *peer,
vhostfdname || (tap->has_vhostforce && tap->vhostforce)) {
int vhostfd;
- if (tap->has_vhostfd) {
+ if (tap->has_vhostfd || tap->has_vhostfds) {
vhostfd = monitor_handle_fd_param(cur_mon, vhostfdname);
if (vhostfd == -1) {
return -1;