« Previous | Next » 

Revision 53e51d85


Added by Markus Armbruster over 9 years ago

Fix automatically assigned network names for netdev

If a network client doesn't have a name, we make one up, with
assign_name(). assign_name() creates a name MODEL.NUM, where MODEL is
the client's model, and NUM is the number of MODELs that already

Bug: it misses clients that are not on a VLAN, i.e. netdevs and the
NICs using them:

$ qemu-system-x86_64 -nodefaults -vnc :0 -S -monitor stdio -netdev user,id=hostnet0 -net nic,netdev=hostnet0 -netdev user,id=hostnet1 -net nic,netdev=hostnet1
QEMU 0.14.50 monitor - type 'help' for more information
(qemu) info network
Devices not on any VLAN:
hostnet0: net=, restricted=n peer=e1000.0
hostnet1: net=, restricted=n peer=e1000.0
e1000.0: model=e1000,macaddr=52:54:00:12:34:56 peer=hostnet0
e1000.0: model=e1000,macaddr=52:54:00:12:34:57 peer=hostnet1

Fix that.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Michael S. Tsirkin <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences