Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

networking

tcp

I'm working on a packet capture program. Is it possible for TCP packet to have the FIN flag set but also have data?

like image 836
vy32 Avatar asked Jan 02 '12 15:01

vy32


1 Answers

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.

like image 163
Mike Pennington Avatar answered Sep 25 '22 06:09

Mike Pennington