Reputation: 29655
I'm working on a packet capture program. Is it possible for TCP packet to have the FIN flag set but also have data?
Upvotes: 8
Views: 4253
Reputation: 43077
Strictly speaking, it is possible to put data in a TCP FIN
packet... Quoting from RFC 793 (emphasis mine):
The SYN and FIN are the only controls requiring this protection, and these controls are used only at connection opening and closing. For sequence number purposes, the SYN is considered to occur before the first actual data octet of the segment in which it occurs, while the FIN is considered to occur after the last actual data octet in a segment in which it occurs.
Upvotes: 10