* [Qemu-devel] multiple tun/tap instances no longer working @ 2007-01-09 16:57 Rick Vernam 2007-01-09 17:57 ` Rick Vernam 0 siblings, 1 reply; 3+ messages in thread From: Rick Vernam @ 2007-01-09 16:57 UTC (permalink / raw) To: qemu-devel I recently built cvs, and found that I can no longer have multiple instances of qemu using tun/tap. the invocation of qemu includes, for each instance: -net nic -net tap,script=/etc/qemu-ifup /etc/qemu-ifup: #!/bin/sh sudo /sbin/ifconfig $1 192.168.2.196 sudo brctl addif br0 $1 strace of qemu-system-x86_64: ... open("/dev/net/tun", O_RDWR) = 3 ioctl(3, TUNSETIFF, 0x7fffca661bf0) = -1 EBUSY (Device or resource busy) write(2, "warning: could not configure /de"..., 72warning: could not configure /dev/net/tun: no virtual network emulation ) = 72 close(3) = 0 write(2, "Could not initialize device \'tap"..., 34Could not initialize device 'tap' ) = 34 exit_group(1) = ? Process 8206 detached The only thing that has changed is building qemu from cvs yesterday. Prior to that, I had been using cvs from a few weeks ago. I'm not too familiar with qemu source, but I will start looking at some of the commits from the past few weeks for anything. Any ideas? Thanks. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] multiple tun/tap instances no longer working 2007-01-09 16:57 [Qemu-devel] multiple tun/tap instances no longer working Rick Vernam @ 2007-01-09 17:57 ` Rick Vernam 2007-01-09 18:20 ` Rick Vernam 0 siblings, 1 reply; 3+ messages in thread From: Rick Vernam @ 2007-01-09 17:57 UTC (permalink / raw) To: qemu-devel in vl.c, it looks like tap_open is called with an uninitialized ifname - instead of ifname[0] == '\0', or a valid ifname, it is a bunch of gibberish - in my case, "ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ" I'm not all that great with gdbg yet, so it might take me a while to figure out where the bad call to tap_open is coming from... On Tuesday 09 January 2007 10:57, Rick Vernam wrote: > I recently built cvs, and found that I can no longer have multiple > instances of qemu using tun/tap. > > the invocation of qemu includes, for each instance: > -net nic -net tap,script=/etc/qemu-ifup > > /etc/qemu-ifup: > #!/bin/sh > sudo /sbin/ifconfig $1 192.168.2.196 > sudo brctl addif br0 $1 > > strace of qemu-system-x86_64: > ... > open("/dev/net/tun", O_RDWR) = 3 > ioctl(3, TUNSETIFF, 0x7fffca661bf0) = -1 EBUSY (Device or resource > busy) write(2, "warning: could not configure /de"..., 72warning: could not > configure /dev/net/tun: no virtual network emulation > ) = 72 > close(3) = 0 > write(2, "Could not initialize device \'tap"..., 34Could not initialize > device 'tap' > ) = 34 > exit_group(1) = ? > Process 8206 detached > > > The only thing that has changed is building qemu from cvs yesterday. Prior > to that, I had been using cvs from a few weeks ago. > > I'm not too familiar with qemu source, but I will start looking at some of > the commits from the past few weeks for anything. > > Any ideas? > Thanks. > > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] multiple tun/tap instances no longer working 2007-01-09 17:57 ` Rick Vernam @ 2007-01-09 18:20 ` Rick Vernam 0 siblings, 0 replies; 3+ messages in thread From: Rick Vernam @ 2007-01-09 18:20 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 2165 bytes --] I'm not too familiar with diff, so if the attached patch is no good, please do let me know how to correct it. On Tuesday 09 January 2007 11:57, Rick Vernam wrote: > in vl.c, it looks like tap_open is called with an uninitialized ifname - > instead of ifname[0] == '\0', or a valid ifname, it is a bunch of gibberish > - in my > case, > "ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ" > > I'm not all that great with gdbg yet, so it might take me a while to figure > out where the bad call to tap_open is coming from... > > On Tuesday 09 January 2007 10:57, Rick Vernam wrote: > > I recently built cvs, and found that I can no longer have multiple > > instances of qemu using tun/tap. > > > > the invocation of qemu includes, for each instance: > > -net nic -net tap,script=/etc/qemu-ifup > > > > /etc/qemu-ifup: > > #!/bin/sh > > sudo /sbin/ifconfig $1 192.168.2.196 > > sudo brctl addif br0 $1 > > > > strace of qemu-system-x86_64: > > ... > > open("/dev/net/tun", O_RDWR) = 3 > > ioctl(3, TUNSETIFF, 0x7fffca661bf0) = -1 EBUSY (Device or resource > > busy) write(2, "warning: could not configure /de"..., 72warning: could > > not configure /dev/net/tun: no virtual network emulation > > ) = 72 > > close(3) = 0 > > write(2, "Could not initialize device \'tap"..., 34Could not initialize > > device 'tap' > > ) = 34 > > exit_group(1) = ? > > Process 8206 detached > > > > > > The only thing that has changed is building qemu from cvs yesterday. > > Prior to that, I had been using cvs from a few weeks ago. > > > > I'm not too familiar with qemu source, but I will start looking at some > > of the commits from the past few weeks for anything. > > > > Any ideas? > > Thanks. > > > > > > _______________________________________________ > > Qemu-devel mailing list > > Qemu-devel@nongnu.org > > http://lists.nongnu.org/mailman/listinfo/qemu-devel > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel [-- Attachment #2: vl.c.patch --] [-- Type: text/x-diff, Size: 673 bytes --] --- qemu/vl.c 2007-01-07 16:04:40.000000000 -0600 +++ vl.c 2007-01-09 12:16:09.000000000 -0600 @@ -3885,9 +3885,11 @@ ret = -1; if (net_tap_fd_init(vlan, fd)) ret = 0; } else { - get_param_value(ifname, sizeof(ifname), "ifname", p); + if (get_param_value(ifname, sizeof(ifname), "ifname", p) == 0) { + ifname[0]='\0'; + } if (get_param_value(setup_script, sizeof(setup_script), "script", p) == 0) { pstrcpy(setup_script, sizeof(setup_script), DEFAULT_NETWORK_SCRIPT); } ret = net_tap_init(vlan, ifname, setup_script); ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-01-09 18:20 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-01-09 16:57 [Qemu-devel] multiple tun/tap instances no longer working Rick Vernam 2007-01-09 17:57 ` Rick Vernam 2007-01-09 18:20 ` Rick Vernam
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).