From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c24hc-00046g-H2 for qemu-devel@nongnu.org; Wed, 02 Nov 2016 19:12:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c24hZ-0007kk-G0 for qemu-devel@nongnu.org; Wed, 02 Nov 2016 19:12:16 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:52319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c24hZ-0007ka-Aa for qemu-devel@nongnu.org; Wed, 02 Nov 2016 19:12:13 -0400 Date: Thu, 3 Nov 2016 00:12:10 +0100 From: Samuel Thibault Message-ID: <20161102231210.GM3688@var.home> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] slirp: fix ipv6 guest network access with windows host List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bo Hu Cc: jan.kiszka@siemens.com, qemu-devel@nongnu.org, sw@weilnetz.de Hello, Bo Hu, on Wed 02 Nov 2016 16:02:29 -0700, wrote: > =A0 =A0 This patch is from android emulator (which is based on qemu2.2)= and I hope > this patch is > also useful to upstream qemu as well. Indeed, even if normally we fill all required fields, it's probably better to memset the whole structure. > From 021eac8c593a34a6a5e106d187a8e1fd22a1522f Mon Sep 17 00:00:00 2001 > From: bohu <[1]bohu@google.com> > Date: Wed, 2 Nov 2016 15:56:26 -0700 > Subject: [PATCH] slirp: fix ipv6 guest network access with windows host >=20 > In tcp_input function, local sockaddr_storage variables lhost > and fhost are used without being cleared to zero; and consequently > tcp connect call fails on windows because there is some random data > in those variables (windows complains with WSAEADDRNOTAVAIL); >=20 > This CL calls memset to clear those two variables so that the address > passed to connect does not have random data in it. >=20 > Signed-off-by: Bo Hu <[2]bohu@google.com> > + =A0 =A0memset(&lhost, 0, sizeof(lhost); > + =A0 =A0memset(&fhost, 0, sizeof(fhost); There is just a typo: missing closing parenthesis... But apart from that, Reviewed-by: Samuel Thibault Samuel