From: "Tao Wu(吴涛@Eng)" <lepton@google.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: QEMU <qemu-devel@nongnu.org>,
Samuel Thibault <samuel.thibault@gnu.org>,
maethor@subiron.org
Subject: Re: [Qemu-devel] [PATCH] slirp: don't zero ti_i since we access it later.
Date: Thu, 9 Nov 2017 10:48:27 -0800 [thread overview]
Message-ID: <CAOvqHj6Sw6_a90WRsLd3YgVu-rRL5k9cgRy1vbgEfCucf_7dXQ@mail.gmail.com> (raw)
In-Reply-To: <CAJ+F1CK53wNxwixP8M4JgbG4kKgpgu_EdJ6-RyNnevNGQsXmJw@mail.gmail.com>
Thanks. Actually this is a follow up with my previous effort to fix this
bug.
I was busy on something else and then got lost in that old thread. Now I
just checked some my local patch
to see if they've merged to upstream and then found it out.
This is old thread about this:
http://lists.nongnu.org/archive/html/qemu-devel/2017-04/msg05544.html
On Thu, Nov 9, 2017 at 2:50 AM, Marc-André Lureau <
marcandre.lureau@gmail.com> wrote:
> Hi
>
> Adding Guillaume in CC, who wrote that line in commit 98c63057d2144
>
> On Wed, Nov 8, 2017 at 11:53 PM, Tao Wu via Qemu-devel
> <qemu-devel@nongnu.org> wrote:
> > The current code looks buggy, we zero ti_i while we access
> > ti_dst/ti_src later.
>
> Could you described the symptoms and why you fixed it that way?
>
> thanks
>
> >
> > Signed-off-by: Tao Wu <lepton@google.com>
> > ---
> > slirp/tcp_subr.c | 11 ++++++++++-
> > 1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
> > index dc8b4bbb50..da0d53743f 100644
> > --- a/slirp/tcp_subr.c
> > +++ b/slirp/tcp_subr.c
> > @@ -148,7 +148,16 @@ tcp_respond(struct tcpcb *tp, struct tcpiphdr *ti,
> struct mbuf *m,
> > m->m_data += IF_MAXLINKHDR;
> > *mtod(m, struct tcpiphdr *) = *ti;
> > ti = mtod(m, struct tcpiphdr *);
> > - memset(&ti->ti, 0, sizeof(ti->ti));
> > + switch (af) {
> > + case AF_INET:
> > + ti->ti.ti_i4.ih_x1 = 0;
> > + break;
> > + case AF_INET6:
> > + ti->ti.ti_i6.ih_x1 = 0;
> > + break;
> > + default:
> > + g_assert_not_reached();
> > + }
> > flags = TH_ACK;
> > } else {
> > /*
> > --
> > 2.15.0.448.gf294e3d99a-goog
> >
> >
>
>
>
> --
> Marc-André Lureau
>
next prev parent reply other threads:[~2017-11-09 18:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-20 20:43 [Qemu-devel] [PATCH 1/1] slirp: don't zero ti_i since we acccess it later Tao Wu
2017-04-24 9:15 ` Thomas Huth
2017-04-27 13:21 ` Samuel Thibault
2017-05-03 18:35 ` lepton
2017-05-04 23:05 ` Samuel Thibault
2017-05-08 19:08 ` lepton
2017-05-08 19:54 ` Samuel Thibault
2017-11-08 22:53 ` [Qemu-devel] [PATCH] slirp: don't zero ti_i since we access " Tao Wu
2017-11-08 23:21 ` no-reply
2017-11-09 10:50 ` Marc-André Lureau
2017-11-09 18:48 ` Tao Wu(吴涛@Eng) [this message]
2017-11-09 18:50 ` Samuel Thibault
2017-11-09 17:52 ` Samuel Thibault
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=CAOvqHj6Sw6_a90WRsLd3YgVu-rRL5k9cgRy1vbgEfCucf_7dXQ@mail.gmail.com \
--to=lepton@google.com \
--cc=maethor@subiron.org \
--cc=marcandre.lureau@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=samuel.thibault@gnu.org \
/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).