[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/27] net: hmp_host_net_remove: Del the -net option
From: |
Jason Wang |
Subject: |
[Qemu-devel] [PULL 02/27] net: hmp_host_net_remove: Del the -net option of the removed host_net |
Date: |
Mon, 26 Sep 2016 16:59:10 +0800 |
From: Shmulik Ladkani <address@hidden>
Upon hmp_host_net_remove(), the appropriate -net client is deleted
(according to the given vlan_id and device id), as well as the
corresponsing hub port.
However, the relevant '-net' option that was added by former
hmp_host_net_add() call is still present in "net" options group.
This makes the following legit HMP sequence erroneous:
(qemu) host_net_add tap id=n1,ifname=tap1,script=no,downscript=no,vlan=1
(qemu) host_net_remove 1 n1
(qemu) host_net_add tap id=n1,ifname=tap1,script=no,downscript=no,vlan=1
Duplicate ID 'n1' for net
Fix, by deleting the stored '-net' option associated with the given
device id.
Signed-off-by: Shmulik Ladkani <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
---
net/net.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/net.c b/net/net.c
index d51cb29..0bec096 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1179,6 +1179,7 @@ void hmp_host_net_remove(Monitor *mon, const QDict *qdict)
qemu_del_net_client(nc->peer);
qemu_del_net_client(nc);
+ qemu_opts_del(qemu_opts_find(qemu_find_opts("net"), device));
}
void netdev_add(QemuOpts *opts, Error **errp)
--
2.7.4
- [Qemu-devel] [PULL 00/27] Net patches, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 01/27] virtio-net: allow increasing rx queue size, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 02/27] net: hmp_host_net_remove: Del the -net option of the removed host_net,
Jason Wang <=
- [Qemu-devel] [PULL 03/27] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 05/27] net/colo.c: add colo.c to define and handle packet, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 04/27] colo-compare: introduce colo compare initialization, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 06/27] Jhash: add linux kernel jhashtable in qemu, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 07/27] colo-compare: track connection and enqueue packet, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 08/27] colo-compare: introduce packet comparison thread, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 09/27] colo-compare: add TCP, UDP, ICMP packet comparison, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 10/27] filter-rewriter: introduce filter-rewriter initialization, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 11/27] filter-rewriter: track connection and parse packet, Jason Wang, 2016/09/26
- [Qemu-devel] [PULL 12/27] filter-rewriter: rewrite tcp packet to keep secondary connection, Jason Wang, 2016/09/26