From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CPKZZ-0006v5-2I for qemu-devel@nongnu.org; Wed, 03 Nov 2004 07:49:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CPKZT-0006pb-AH for qemu-devel@nongnu.org; Wed, 03 Nov 2004 07:49:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CPKZL-0006m5-0h for qemu-devel@nongnu.org; Wed, 03 Nov 2004 07:48:56 -0500 Received: from [130.136.1.101] (helo=lea.cs.unibo.it) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CPKR9-0000kr-Ay for qemu-devel@nongnu.org; Wed, 03 Nov 2004 07:40:27 -0500 Date: Wed, 3 Nov 2004 13:40:25 +0100 Subject: Re: [Qemu-devel] [patch] problems with dual ethernet networking Message-ID: <20041103124025.GF23923@cs.unibo.it> References: <20041102184443.GB18735@circolab.net> <20041103024531.GA19904@jbrown.mylinuxbox.org> <20041103093553.GA23923@cs.unibo.it> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="r5Pyd7+fXNt84Ff3" Content-Disposition: inline In-Reply-To: <20041103093553.GA23923@cs.unibo.it> From: renzo@cs.unibo.it (Renzo Davoli) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Nov 03, 2004 at 10:35:53AM +0100, Renzo Davoli wrote: > Actually, it was implemented in qemu and vdeq used the multiple > -tun-fd option provided bu qemu. > qemu has changed recently the option management, now it wants multiple -tun-fd options for several tun interfaces (previously it accepted several comma separated numbers). I have just committed on cvs an updated version of vde that should be able to work with multiple interfaces. the -nics option should not be needed. Sourceforge sometimes is late in updating the public access cvs, thus I am sending here enclosed the patch for vdeq.c. I have had no time to test it personally, please let me know if it works correctly. BTW: if you are connecting also several qemu machines on the same vde network remember to change the MAC addresses! The default configuration MAC is 52:54:00:12:34:56. (for eth0, 52:54:00:12:34:57 for eth1 etc.). Several machines on the same network using the standard configuration end up having the same MAC: networking does not work. i.e. it is a net-does-not-work. renzo --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="vdeq.diff" --- vde-1.5.7/qemu/vdeq.c 2004-11-03 12:57:35.185373176 +0100 +++ vde-1.5.8/qemu/vdeq.c 2004-11-03 13:11:43.333435072 +0100 @@ -78,12 +78,10 @@ unsigned char bufin[BUFSIZE]; -//struct pollfd pollv[]={{STDIN_FILENO,POLLIN|POLLHUP,0},{0,POLLIN|POLLHUP,0}}; struct pollfd *pollv; char *filename; char *vdeqname; -char *numfd; #define NUMW 10 static int countnics(const char *s) @@ -169,19 +167,12 @@ perror("malloc nics"); exit(1); } - if ((numfd= (char *) malloc(nb_nics * NUMW * sizeof (char)))<0) { - perror("malloc numfd"); - exit(1); - } for (i=0; i %s\n",i,sockname[i]); */ - newargc=argc+3-args; + newargc=argc+1+(2*nb_nics)-args; if ((newargv=(char **) malloc ((newargc+1)* sizeof(char *))) <0) { perror("malloc"); exit(1); } newargv[0]=filename; - newargv[1]="-tun-fd"; - newargv[2]=numfd; + for (i=0; i