]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Store the interface vlan number in the domain state
authorMark McLoughlin <markmc@redhat.com>
Fri, 17 Jul 2009 21:08:34 +0000 (22:08 +0100)
committerMark McLoughlin <markmc@redhat.com>
Wed, 22 Jul 2009 10:34:06 +0000 (11:34 +0100)
commit30605477f2ade95f2eedacbf193cd0a003a67613
tree7b62a745b12433718ce507b286111c2de451dbd8
parent36c820e6c8acf5a0c74d89817bf42240c541b10d
Store the interface vlan number in the domain state

Currently, an interface's vlan number corresponds to its index in
the table of network interfaces. That is no longer true when we
allow devices to be removed.

To fix this, we store the vlan number in the domain's state XML
so that it survives libvirtd restarts.

* src/domain_conf.h: add vlan number to virDomainNetDef

* src/domain_conf.c: store it in XML as <state vlan='N'/>, defaulting
  to -1 if this is state saved by a previous version of libvirt

* src/qemu_conf.c: assign vlan numbers before starting qemu
src/domain_conf.c
src/domain_conf.h
src/qemu_conf.c