Signed-off-by: Yang Hongyang <yan...@cn.fujitsu.com> --- net/net.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/net/net.c b/net/net.c index c273981..321362f 100644 --- a/net/net.c +++ b/net/net.c @@ -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. */ -- 1.9.1