slirp: don't zero the whole ti_i when m == NULL
commit990132cda9baa27bdc558df6c9c15aacb0322d2c
authorTao Wu <lepton@google.com>
Wed, 8 Nov 2017 22:53:40 +0000 (8 14:53 -0800)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Thu, 9 Nov 2017 17:59:22 +0000 (9 18:59 +0100)
treecb40a0540ad52feeb05d38f5cc2c705bd5cee6d4
parentb0fbe46ad82982b289a44ee2495b59b0bad8a842
slirp: don't zero the whole ti_i when m == NULL

98c63057d2144fb81681580cd84c13c93794c96e ('slirp: Factorizing
tcpiphdr structure with an union') introduced a memset call to clear
possibly-undefined fields in ti. This however overwrites src/dst/pr which
are used below.

So let us clear only the unused fields.

This should fix some rare cases (some RST cases, keep alive probes)
where packets would be sent to 0.0.0.0.

Signed-off-by: Tao Wu <lepton@google.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
slirp/tcp_subr.c