[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [7205] net: Check device passed to host_net_remove (Jan Kis
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [7205] net: Check device passed to host_net_remove (Jan Kiszka) |
Date: |
Tue, 21 Apr 2009 20:47:52 +0000 |
Revision: 7205
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=7205
Author: aliguori
Date: 2009-04-21 20:47:51 +0000 (Tue, 21 Apr 2009)
Log Message:
-----------
net: Check device passed to host_net_remove (Jan Kiszka)
Make sure that we do not delete guest NICs via host_net_remove.
Signed-off-by: Jan Kiszka <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
Modified Paths:
--------------
branches/stable_0_10/net.c
Modified: branches/stable_0_10/net.c
===================================================================
--- branches/stable_0_10/net.c 2009-04-21 19:56:44 UTC (rev 7204)
+++ branches/stable_0_10/net.c 2009-04-21 20:47:51 UTC (rev 7205)
@@ -1854,14 +1854,20 @@
vlan = qemu_find_vlan(vlan_id);
- for(vc = vlan->first_client; vc != NULL; vc = vc->next)
- if (!strcmp(vc->name, device))
+ for (vc = vlan->first_client; vc != NULL; vc = vc->next) {
+ if (!strcmp(vc->name, device)) {
break;
+ }
+ }
if (!vc) {
term_printf("can't find device %s\n", device);
return;
}
+ if (!net_host_check_device(vc->model)) {
+ term_printf("invalid host network device %s\n", device);
+ return;
+ }
qemu_del_vlan_client(vc);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [7205] net: Check device passed to host_net_remove (Jan Kiszka),
Anthony Liguori <=