Can a TCP data segment with a 1 byte length have, at the same time, the flags ACK, PSH, URG set ? Is it conform or not to the TCP protocol ?
Network Engineering Stack Exchange is a question and answer site for network engineers. It only takes a minute to sign up.Sign up to join this community
During the initial handshake, the OJDBC driver sends a packet with three TCP flags : ACK, PSH, URG. This packet is dropped by the firewall between the client and the DB server and the connection is not established.
That is correct. The initial segment from the initiator ("client") to the listener ("server") needs to use the SYN flag. If successful, the listener replies with SYN+ACK. Then the initiator sends a final ACK, mutually synchronizing their respective sequence number values. This is the classic TCP 'three-way handshake'.
PSH and/or URG flags may be used with any subsequent data segments, with or without ACK - these segments may not be empty though (not just a pure ACK without sending data). Using those flags within the initial SYN - SYN+ACK - ACK handshake isn't legal accordingly. Using stateful inspection, a firewall may reject an empty segment with PSH or URG.
Can a TCP data segment with a 1 byte length have, at the same time, the flags ACK, PSH, URG set ?
Yes. There's nothing in RFC 793 or common logic that prohibits such a segment, as long as it contains valid acknowledgement number and urgent pointer fields. You can check for yourself in RFC 793.