qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@gnu.org>
To: Bo Hu <bohu@google.com>
Cc: jan.kiszka@siemens.com, qemu-devel@nongnu.org, sw@weilnetz.de
Subject: Re: [Qemu-devel] slirp: fix ipv6 guest network access with windows host
Date: Thu, 3 Nov 2016 00:12:10 +0100	[thread overview]
Message-ID: <20161102231210.GM3688@var.home> (raw)
In-Reply-To: <CA+VNGG0RAT7ZbH42kw=DxptSPODmE_tfgvfQmSYNg6f-u=t-fw@mail.gmail.com>

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 <[1]bohu@google.com>
> 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 <[2]bohu@google.com>

> +    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 <samuel.thibault@ens-lyon.org>

Samuel

      reply	other threads:[~2016-11-02 23:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 23:02 [Qemu-devel] slirp: fix ipv6 guest network access with windows host Bo Hu
2016-11-02 23:12 ` Samuel Thibault [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161102231210.GM3688@var.home \
    --to=samuel.thibault@gnu.org \
    --cc=bohu@google.com \
    --cc=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).