Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 340e01248478ba8b78a6d4d1809b1eff > files > 379

kvm-83-270.el5_11.src.rpm

From 3586c74c50d3fa4277a138976c20a4473f4d2731 Mon Sep 17 00:00:00 2001
From: Eduardo Habkost <ehabkost@redhat.com>
Date: Thu, 19 Mar 2009 13:01:22 -0300
Subject: [PATCH 2/6] host_device_remove: remove incorrect check for device name

There is no need to check for valid prefixes on the the device name
when removing them. If they are found on the client list of a vlan,
it is a valid name, 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>
Bugzilla: 491156
RH-Upstream-status: submitted(qemu-devel)
Acked-by: Marcelo Tosatti <mtosatti@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
---
 qemu/net.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/qemu/net.c b/qemu/net.c
index 2de134e..88e2b58 100644
--- a/qemu/net.c
+++ b/qemu/net.c
@@ -1966,11 +1966,6 @@ void net_host_device_remove(int vlan_id, const char *device)
     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);
-- 
1.6.1