From: Eduardo Habkost <ehabkost@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] host_device_remove: remove incorrect check for device name
Date: Thu, 19 Mar 2009 13:11:07 -0300 [thread overview]
Message-ID: <1237479067-3979-1-git-send-email-ehabkost@redhat.com> (raw)
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 <ehabkost@redhat.com>
---
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
next reply other threads:[~2009-03-19 16:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-19 16:11 Eduardo Habkost [this message]
2009-03-19 20:16 ` [Qemu-devel] [PATCH] host_device_remove: remove incorrect check for device name Marcelo Tosatti
2009-03-28 15:59 ` [Qemu-devel] " Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1237479067-3979-1-git-send-email-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).