From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LkOfX-0004nv-7n for qemu-devel@nongnu.org; Thu, 19 Mar 2009 16:16:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LkOfS-0004nc-L3 for qemu-devel@nongnu.org; Thu, 19 Mar 2009 16:16:46 -0400 Received: from [199.232.76.173] (port=48397 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LkOfS-0004nZ-HL for qemu-devel@nongnu.org; Thu, 19 Mar 2009 16:16:42 -0400 Received: from mx2.redhat.com ([66.187.237.31]:42842) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LkOfQ-0002kC-IO for qemu-devel@nongnu.org; Thu, 19 Mar 2009 16:16:41 -0400 Date: Thu, 19 Mar 2009 17:16:26 -0300 From: Marcelo Tosatti Subject: Re: [Qemu-devel] [PATCH] host_device_remove: remove incorrect check for device name Message-ID: <20090319201626.GA15329@amt.cnet> References: <1237479067-3979-1-git-send-email-ehabkost@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1237479067-3979-1-git-send-email-ehabkost@redhat.com> 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 ACK, thanks Eduardo. On Thu, Mar 19, 2009 at 01:11:07PM -0300, 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 > --- > 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 > >