]> Git Repo - qemu.git/commitdiff
tap: properly initialize vhostfds
authorJason Wang <[email protected]>
Fri, 19 Apr 2013 07:11:15 +0000 (15:11 +0800)
committerStefan Hajnoczi <[email protected]>
Fri, 3 May 2013 11:53:46 +0000 (13:53 +0200)
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 <[email protected]>
Cc: Michal Privoznik <[email protected]>
Cc: [email protected]
Signed-off-by: Jason Wang <[email protected]>
Reviewed-by: Michal Privoznik <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
net/tap.c

index 17bdf014a903a979044039cd7c70887496d485c7..e0b7a2a5a04cfed8af5bff55a56bc300051bffce 100644 (file)
--- 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;
This page took 0.033122 seconds and 4 git commands to generate.