From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lnap2-0006Sz-Vi for qemu-devel@nongnu.org; Sat, 28 Mar 2009 11:51:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lnap2-0006SQ-D4 for qemu-devel@nongnu.org; Sat, 28 Mar 2009 11:51:48 -0400 Received: from [199.232.76.173] (port=57795 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lnap2-0006SM-5n for qemu-devel@nongnu.org; Sat, 28 Mar 2009 11:51:48 -0400 Received: from savannah.gnu.org ([199.232.41.3]:54726 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lnap1-0008MM-Sx for qemu-devel@nongnu.org; Sat, 28 Mar 2009 11:51:47 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Lnap1-0002Ay-1C for qemu-devel@nongnu.org; Sat, 28 Mar 2009 15:51:47 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.69) (envelope-from ) id 1Lnap0-0002Au-Px for qemu-devel@nongnu.org; Sat, 28 Mar 2009 15:51:46 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Sat, 28 Mar 2009 15:51:46 +0000 Subject: [Qemu-devel] [6890] host_device_remove: remove incorrect check for device name ( Eduardo Habkost) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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) Signed-off-by: Eduardo Habkost Signed-off-by: Anthony Liguori Modified Paths: -------------- branches/stable_0_10/net.c Modified: branches/stable_0_10/net.c =================================================================== --- branches/stable_0_10/net.c 2009-03-28 15:46:15 UTC (rev 6889) +++ branches/stable_0_10/net.c 2009-03-28 15:51:46 UTC (rev 6890) @@ -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);