Properly set the ISN's when the SYN and SYN/ACK are received out-of-order.

svn path=/trunk/; revision=48466
This commit is contained in:
Sake Blok 2013-03-21 22:25:42 +00:00
parent ef07303c20
commit a4fe30275f

View file

@ -847,9 +847,15 @@ tcp_analyze_sequence_number(packet_info *pinfo, guint32 seq, guint32 ack, guint3
* There's no guarantee that the ACK field of a SYN
* contains zeros; get the ISN from the first segment
* with the ACK bit set instead (usually the SYN/ACK).
*
* If the SYN and SYN/ACK were received out-of-order,
* the ISN is ack-1. If we missed the SYN/ACK, but got
* the last ACK of the 3WHS, the ISN is ack-1. For all
* all other packets the ISN is unknown, so ack-1 is
* as good a guess as ack.
*/
if( (tcpd->rev->base_seq==0) && (flags & TH_ACK) ) {
tcpd->rev->base_seq = (flags & TH_SYN) ? ack : ack-1;
tcpd->rev->base_seq = ack-1;
}
if( flags & TH_ACK ) {