Skip to contentSkip to conversation

[6890] host_device_remove: remove incorrect check for device name ( Eduardo Habkost)

Qemu-devel Anthony Liguori 1 participant 1 message Mar 28, 2009

lore
Share & tools
lore
#0 lore raw

Revision: 6890

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6890
Author:   aliguori
Date:     2009-03-28 15:51:46 +0000 (Sat, 28 Mar 2009)

Log Message:
-----------
host_device_remove: remove incorrect check for device name (Eduardo Habkost)

There is no need to check for valid prefixes on the the device name when removing it. If the device name is found on the vlan client list, it can be removed, regardless of the prefix used on its name.

To reproduce the bug, just run this on the monitor:

(qemu) host_net_add user name=foobar
(qemu) host_net_remove 0 foobar
invalid host network device foobar
(qemu)

Modified Paths:
--------------

    branches/stable_0_10/net.c

Modified: branches/stable_0_10/net.c
===================================================================

stable_0_10/net.c +0 -5
@@ -1818,11 +1818,6 @@
     VLANState *vlan;
     VLANClientState *vc;
 
-    if (!net_host_check_device(device)) {
-        term_printf("invalid host network device %s\n", device);
-        return;
-    }
-
     vlan = qemu_find_vlan(vlan_id);
     if (!vlan) {
         term_printf("can't find vlan %d\n", vlan_id);