From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LkKqE-0007Cw-GG for qemu-devel@nongnu.org; Thu, 19 Mar 2009 12:11:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LkKq9-000798-7O for qemu-devel@nongnu.org; Thu, 19 Mar 2009 12:11:33 -0400 Received: from [199.232.76.173] (port=34599 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkKq9-00078u-0C for qemu-devel@nongnu.org; Thu, 19 Mar 2009 12:11:29 -0400 Received: from mx2.redhat.com ([66.187.237.31]:52197) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LkKq8-0006lf-L2 for qemu-devel@nongnu.org; Thu, 19 Mar 2009 12:11:28 -0400 From: Eduardo Habkost Date: Thu, 19 Mar 2009 13:11:07 -0300 Message-Id: <1237479067-3979-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH] host_device_remove: remove incorrect check for device name Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org 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 --- 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