vy32
vy32

Reputation: 29655

Can a TCP packet with the FIN flag also have data?

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

Answers (1)

Mike Pennington
Mike Pennington

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

Related Questions