forked from osmocom/wireshark
TCP: Obvious Spurious Retransmissions are not always detected
In rare circumstances Spurious Retransmissions are not detected and the SEQ analysis would instead conclude with a Fast Retransmit or an Out-Of-Order. As Spurious Retransmissions are more certain than the latter ones, their respective precedences are changed. The documentation is updated accordingly. Closes #13863.
This commit is contained in:
parent
51cf733fc6
commit
439ecf98b6
|
@ -466,7 +466,7 @@ Set when all of the following are true:
|
||||||
* The current sequence number equals the next expected acknowledgement number.
|
* The current sequence number equals the next expected acknowledgement number.
|
||||||
* We saw the last acknowledgement less than 20ms ago.
|
* We saw the last acknowledgement less than 20ms ago.
|
||||||
|
|
||||||
Supersedes “Out-Of-Order”, “Spurious Retransmission”, and “Retransmission”.
|
Supersedes “Out-Of-Order” and “Retransmission”.
|
||||||
|
|
||||||
// TCP_A_KEEP_ALIVE
|
// TCP_A_KEEP_ALIVE
|
||||||
[discrete]
|
[discrete]
|
||||||
|
@ -507,7 +507,7 @@ Set when all of the following are true:
|
||||||
* The last segment arrived within the Out-Of-Order RTT threshold.
|
* The last segment arrived within the Out-Of-Order RTT threshold.
|
||||||
The threshold is either the value shown in the “iRTT” (tcp.analysis.initial_rtt) field under “SEQ/ACK analysis” if it is present, or the default value of 3ms if it is not.
|
The threshold is either the value shown in the “iRTT” (tcp.analysis.initial_rtt) field under “SEQ/ACK analysis” if it is present, or the default value of 3ms if it is not.
|
||||||
|
|
||||||
Supersedes “Spurious Retransmission” and “Retransmission”.
|
Supersedes “Retransmission”.
|
||||||
|
|
||||||
// TCP_A_REUSED_PORTS
|
// TCP_A_REUSED_PORTS
|
||||||
[discrete]
|
[discrete]
|
||||||
|
@ -534,7 +534,7 @@ direction. Set when all of the following are true:
|
||||||
* Data for this flow has been acknowledged. That is, the last-seen acknowledgement number has been set.
|
* Data for this flow has been acknowledged. That is, the last-seen acknowledgement number has been set.
|
||||||
* The next sequence number is less than or equal to the last-seen acknowledgement number.
|
* The next sequence number is less than or equal to the last-seen acknowledgement number.
|
||||||
|
|
||||||
Supersedes “Retransmission”.
|
Supersedes “Fast Retransmission”, “Out-Of-Order”, and “Retransmission”.
|
||||||
|
|
||||||
// TCP_A_RETRANSMISSION
|
// TCP_A_RETRANSMISSION
|
||||||
[discrete]
|
[discrete]
|
||||||
|
|
|
@ -2234,6 +2234,20 @@ finished_fwd:
|
||||||
seq_not_advanced = FALSE;
|
seq_not_advanced = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Check for spurious retransmission. If the current seq + segment length
|
||||||
|
* is less than or equal to the current lastack, the packet contains
|
||||||
|
* duplicate data and may be considered spurious.
|
||||||
|
*/
|
||||||
|
if ( seglen > 0
|
||||||
|
&& tcpd->rev->tcp_analyze_seq_info->lastack
|
||||||
|
&& LE_SEQ(seq + seglen, tcpd->rev->tcp_analyze_seq_info->lastack) ) {
|
||||||
|
if(!tcpd->ta){
|
||||||
|
tcp_analyze_get_acked_struct(pinfo->num, seq, ack, TRUE, tcpd);
|
||||||
|
}
|
||||||
|
tcpd->ta->flags|=TCP_A_SPURIOUS_RETRANSMISSION;
|
||||||
|
goto finished_checking_retransmission_type;
|
||||||
|
}
|
||||||
|
|
||||||
/* If there were >=2 duplicate ACKs in the reverse direction
|
/* If there were >=2 duplicate ACKs in the reverse direction
|
||||||
* (there might be duplicate acks missing from the trace)
|
* (there might be duplicate acks missing from the trace)
|
||||||
* and if this sequence number matches those ACKs
|
* and if this sequence number matches those ACKs
|
||||||
|
@ -2276,20 +2290,6 @@ finished_fwd:
|
||||||
goto finished_checking_retransmission_type;
|
goto finished_checking_retransmission_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check for spurious retransmission. If the current seq + segment length
|
|
||||||
* is less than or equal to the current lastack, the packet contains
|
|
||||||
* duplicate data and may be considered spurious.
|
|
||||||
*/
|
|
||||||
if ( seglen > 0
|
|
||||||
&& tcpd->rev->tcp_analyze_seq_info->lastack
|
|
||||||
&& LE_SEQ(seq + seglen, tcpd->rev->tcp_analyze_seq_info->lastack) ) {
|
|
||||||
if(!tcpd->ta){
|
|
||||||
tcp_analyze_get_acked_struct(pinfo->num, seq, ack, TRUE, tcpd);
|
|
||||||
}
|
|
||||||
tcpd->ta->flags|=TCP_A_SPURIOUS_RETRANSMISSION;
|
|
||||||
goto finished_checking_retransmission_type;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (seq_not_advanced) {
|
if (seq_not_advanced) {
|
||||||
/* Then it has to be a generic retransmission */
|
/* Then it has to be a generic retransmission */
|
||||||
if(!tcpd->ta) {
|
if(!tcpd->ta) {
|
||||||
|
|
Loading…
Reference in New Issue