Skip to content
Commit d4b9b6c1 authored by Andy Ross's avatar Andy Ross Committed by Jukka Rissanen
Browse files

net: tcp: Destroy net_tcp struct at the same time as the context



The net_tcp struct was being cleaned up and destroyed when the
outbound FIN packet is sent on a connection that already received an
inbound FIN.  That's not right, per spec we need to wait for the ACK
(though this would be benign cheating).  And worse: there were code
paths which were themselves spec-compliant where the net_tcp struct
(now a NULL pointer) would be used after this spot leading to
occasional crazy behavior on socket close.

Don't do it this way.  Clean up the TCP struct at the same time we
destroy the net_context.  Much saner that way.

Change-Id: I4bc6b97eb0b71a7fa8faea02c1eb4c4d3bd3ae6d
Signed-off-by: default avatarAndy Ross <andrew.j.ross@intel.com>
parent 01ae35b5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment