Commit 7cd0874c7a1ff4630d65b30987ebe37e61952d95

Authored by aliguori
1 parent 9f23011a

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)

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6891 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 0 additions and 5 deletions
... ... @@ -1822,11 +1822,6 @@ void net_host_device_remove(Monitor *mon, int vlan_id, const char *device)
1822 1822 VLANState *vlan;
1823 1823 VLANClientState *vc;
1824 1824  
1825   - if (!net_host_check_device(device)) {
1826   - monitor_printf(mon, "invalid host network device %s\n", device);
1827   - return;
1828   - }
1829   -
1830 1825 vlan = qemu_find_vlan(vlan_id);
1831 1826 if (!vlan) {
1832 1827 monitor_printf(mon, "can't find vlan %d\n", vlan_id);
... ...