From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjWK2-0002GX-UI for qemu-devel@nongnu.org; Mon, 12 Sep 2016 14:51:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjWJz-0006ZU-AY for qemu-devel@nongnu.org; Mon, 12 Sep 2016 14:51:13 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:35463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjWJz-0006Rv-4Y for qemu-devel@nongnu.org; Mon, 12 Sep 2016 14:51:11 -0400 Received: by mail-wm0-f49.google.com with SMTP id a6so69148995wmc.0 for ; Mon, 12 Sep 2016 11:50:49 -0700 (PDT) Date: Mon, 12 Sep 2016 21:49:37 +0300 From: Shmulik Ladkani Message-ID: <20160912214937.659b3098@halley> In-Reply-To: <1473066662-4167-1-git-send-email-shmulik.ladkani@ravellosystems.com> References: <1473066662-4167-1-git-send-email-shmulik.ladkani@ravellosystems.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] net: hmp_host_net_remove: Del the -net option of the removed host_net List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: qemu-devel@nongnu.org, idan.brown@ravellosystems.com, Shmulik Ladkani On Mon, 5 Sep 2016 12:11:02 +0300 Shmulik Ladkani wrote: > 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 ping?