qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] slirp: fix ipv6 guest network access with windows host


From: Samuel Thibault
Subject: Re: [Qemu-devel] slirp: fix ipv6 guest network access with windows host
Date: Thu, 3 Nov 2016 00:12:10 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Hello,

Bo Hu, on Wed 02 Nov 2016 16:02:29 -0700, wrote:
>     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 <address@hidden>
> Date: Wed, 2 Nov 2016 15:56:26 -0700
> Subject: [PATCH] slirp: fix ipv6 guest network access with windows host
> 
> 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);
> 
> This CL calls memset to clear those two variables so that the address
> passed to connect does not have random data in it.
> 
> Signed-off-by: Bo Hu <address@hidden>

> +    memset(&lhost, 0, sizeof(lhost);
> +    memset(&fhost, 0, sizeof(fhost);

There is just a typo: missing closing parenthesis...

But apart from that,
Reviewed-by: Samuel Thibault <address@hidden>

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]