[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] vdeq patch
From: |
Iain McFarlane |
Subject: |
[Qemu-devel] vdeq patch |
Date: |
Thu, 17 Nov 2005 22:33:18 +0000 |
User-agent: |
KMail/1.8.92 |
Hello,
For those using vdeq the following patch allows it to work with the new
network options
You will still have to add a -net nic,vlan=0 to your normal qemu options and
vdeq will add -net tap,vlan=0,fd=X
Regards,
Iain
--- vdeq.c.orig 2005-11-17 21:44:05.000000000 +0000
+++ vdeq.c 2005-11-17 22:30:58.000000000 +0000
@@ -208,18 +208,12 @@
newargv[0]=filename;
for (i=0; i<nb_nics; i++) {
- char numfd[10];
- sprintf(numfd,"%d",sp[i][0]);
- newargv[2*i+1]="-tun-fd";
+ char numfd[30];
+ sprintf(numfd,"tap,vlan=0,fd=%d",sp[i][0]);
+ newargv[2*i+1]="-net";
newargv[2*i+2]=strdup(numfd);
}
- {
- char nnics[10];
- sprintf(nnics,"%d",nb_nics);
- newargv[2*nb_nics+1]="-nics";
- newargv[2*nb_nics+2]=strdup(nnics);
- }
- for (i=(2*nb_nics)+3;args<argc;i++,args++) newargv[i]=argv[args];
+ for (i=(2*nb_nics)+1;args<argc;i++,args++) newargv[i]=argv[args];
newargv[i]=0;