[libvirt] PATCH: Don't set ifname or script args for QEMU tap devices

Daniel P. Berrange berrange at redhat.com
Wed May 27 12:33:49 UTC 2009

When running QEMU with a type=bridge or type=network  interface config,
we pass a pre-created  TAP device file descriptor, eg

  -net tap,fd=17,script=,vlan=0,ifname=vnet0

The ifname and script args have always been ignored by all QEMU versions
we support. Latest QEMU will now error out if they are set. So this
patch drops those two redundant options.  NB, then are still set for
type=ethernet inteface configs, because in that config we're not creating
a TAP device.

  -net tap,fd=17,vlan=0 

There is no impact on test cases, because live TAP devices is something
that you can exercise in the test cases.


diff -r b9dc4ea7f6aa src/qemu_conf.c
--- a/src/qemu_conf.c	Tue May 26 16:16:28 2009 +0100
+++ b/src/qemu_conf.c	Tue May 26 22:56:09 2009 +0100
@@ -662,8 +662,8 @@ qemudNetworkIfaceConnect(virConnectPtr c
     snprintf(tapfdstr, sizeof(tapfdstr),
-             "tap,fd=%d,script=,vlan=%d,ifname=%s",
-             tapfd, vlan, net->ifname);
+             "tap,fd=%d,vlan=%d",
+             tapfd, vlan);
     if (!(retval = strdup(tapfdstr)))
         goto no_memory;

|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

More information about the libvir-list mailing list