Skip to content
Snippets Groups Projects
Commit 990132cd authored by Tao Wu's avatar Tao Wu Committed by Samuel Thibault
Browse files

slirp: don't zero the whole ti_i when m == NULL


98c63057 ('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: default avatarTao Wu <lepton@google.com>
Signed-off-by: default avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
parent b0fbe46a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment