@@ -385,9 +385,20 @@ void qemu_del_net_client(NetClientState *nc)
{
NetClientState *ncs[MAX_QUEUE_NUM];
int queues, i;
+ QemuOpts *opts;
assert(nc->info->type != NET_CLIENT_OPTIONS_KIND_NIC);
+ if (nc->peer &&
+ nc->peer->info->type == NET_CLIENT_OPTIONS_KIND_FILTER) {
+ opts = qemu_opts_find(qemu_find_opts_err("netdev", NULL),
+ nc->peer->name);
+ assert(opts);
+
+ qemu_del_net_client(nc->peer);
+ qemu_opts_del(opts);
+ }
+
/* If the NetClientState belongs to a multiqueue backend, we will change all
* other NetClientStates also.
*/
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com> --- net/net.c | 11 +++++++++++ 1 file changed, 11 insertions(+)