From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lnawl-0000eK-4E for qemu-devel@nongnu.org; Sat, 28 Mar 2009 11:59:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lnawg-0000bW-2M for qemu-devel@nongnu.org; Sat, 28 Mar 2009 11:59:46 -0400 Received: from [199.232.76.173] (port=37987 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lnawf-0000bH-SC for qemu-devel@nongnu.org; Sat, 28 Mar 2009 11:59:41 -0400 Received: from yx-out-1718.google.com ([74.125.44.157]:18589) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lnawf-0000gR-H4 for qemu-devel@nongnu.org; Sat, 28 Mar 2009 11:59:41 -0400 Received: by yx-out-1718.google.com with SMTP id 34so862160yxf.82 for ; Sat, 28 Mar 2009 08:59:41 -0700 (PDT) Message-ID: <49CE4969.1060707@codemonkey.ws> Date: Sat, 28 Mar 2009 10:59:37 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1237479067-3979-1-git-send-email-ehabkost@redhat.com> In-Reply-To: <1237479067-3979-1-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [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: Eduardo Habkost Cc: qemu-devel@nongnu.org Eduardo Habkost wrote: > 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 > Applied to stable and trunk. Thanks. Regards, Anthony Liguori > --- > 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); >