All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] host_device_remove: remove incorrect check for device name
@ 2009-03-19 16:11 Eduardo Habkost
  2009-03-19 20:16 ` Marcelo Tosatti
  2009-03-28 15:59 ` [Qemu-devel] " Anthony Liguori
  0 siblings, 2 replies; 3+ messages in thread
From: Eduardo Habkost @ 2009-03-19 16:11 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

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>
---
 net.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/net.c b/net.c
index c853daf..395ee4f 100644
--- a/net.c
+++ b/net.c
@@ -1822,11 +1822,6 @@ void net_host_device_remove(Monitor *mon, int vlan_id, const char *device)
     VLANState *vlan;
     VLANClientState *vc;
 
-    if (!net_host_check_device(device)) {
-        monitor_printf(mon, "invalid host network device %s\n", device);
-        return;
-    }
-
     vlan = qemu_find_vlan(vlan_id);
     if (!vlan) {
         monitor_printf(mon, "can't find vlan %d\n", vlan_id);
-- 
1.6.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-28 15:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-19 16:11 [Qemu-devel] [PATCH] host_device_remove: remove incorrect check for device name Eduardo Habkost
2009-03-19 20:16 ` Marcelo Tosatti
2009-03-28 15:59 ` [Qemu-devel] " Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.