summaryrefslogtreecommitdiff
path: root/net/tap.c
diff options
context:
space:
mode:
authorAmos Kong <akong@redhat.com>2013-04-15 18:55:19 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2013-05-03 13:53:46 +0200
commitc963530a5b3e3e0f7304841adfe84416d82f59f6 (patch)
tree8148b1a46c7b280287bfcc20ff4317460ce87ac4 /net/tap.c
parent8ca27ce2e1150486ea2db4116a03706b28294f16 (diff)
downloadqemu-c963530a5b3e3e0f7304841adfe84416d82f59f6.tar.gz
net: make network client name unique
assign_name() creates a name MODEL.NUM, where MODEL is the client's model, and NUM is the number of MODELs that already exist. Markus added NIC naming for non-VLAN clients in commit 53e51d85. commit d33d93b2 incorrectly added a judgement of net-hub. It caused net clients created with -netdev get same names. eg: # qemu-upstream -device virtio-net-pci,netdev=h1 -netdev tap,id=h1 \ -device virtio-net-pci,netdev=h2 -netdev tap,id=h2 .. (qemu) info network virtio-net-pci.0: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:56 \ h1: index=0,type=tap,ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown virtio-net-pci.0: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:57 \ h2: index=0,type=tap,ifname=tap1,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown This patch removed the check of nic-hub, and created unique names for all net clients that have same model. v2: update commitlog & comments Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'net/tap.c')
0 files changed, 0 insertions, 0 deletions