]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet/tcp_input.c
xnu-344.12.2.tar.gz
[apple/xnu.git] / bsd / netinet / tcp_input.c
index 2e14bc57795d4604665c5d8ce22643f25a4f9314..eb294a6a2a7f16b41e382f91dde0451772af861d 100644 (file)
@@ -1046,7 +1046,7 @@ findpcb:
                                        tp->snd_nxt = tp->snd_max;
                                        tp->t_badrxtwin = 0;
                                }
-                               if ((to.to_flag & TOF_TS) != 0)
+                               if (((to.to_flag & TOF_TS) != 0) && (to.to_tsecr != 0)) /* Makes sure we already have a TS */
                                        tcp_xmit_timer(tp,
                                            tcp_now - to.to_tsecr + 1);
                                else if (tp->t_rtttime &&
@@ -2060,8 +2060,9 @@ process_ACK:
                 * Since we now have an rtt measurement, cancel the
                 * timer backoff (cf., Phil Karn's retransmit alg.).
                 * Recompute the initial retransmit timer.
+                * Also makes sure we have a valid time stamp in hand
                 */
-               if (to.to_flag & TOF_TS)
+               if (((to.to_flag & TOF_TS) != 0) && (to.to_tsecr != 0))
                        tcp_xmit_timer(tp, tcp_now - to.to_tsecr + 1);
                else if (tp->t_rtttime && SEQ_GT(th->th_ack, tp->t_rtseq))
                        tcp_xmit_timer(tp, tp->t_rtttime);