session tcp udp: consolidate transport snd apis
[vpp.git] / src / vnet / tcp / tcp_input.c
index e93e8ba..4f31d21 100755 (executable)
@@ -1312,7 +1312,9 @@ tcp_update_snd_wnd (tcp_connection_t * tc, u32 seq, u32 ack, u32 snd_wnd)
        }
       else
        {
-         tcp_persist_timer_reset (tc);
+         if (PREDICT_FALSE (tcp_timer_is_active (tc, TCP_TIMER_PERSIST)))
+           tcp_persist_timer_reset (tc);
+
          if (PREDICT_FALSE (!tcp_in_recovery (tc) && tc->rto_boff > 0))
            {
              tc->rto_boff = 0;
@@ -2075,7 +2077,8 @@ tcp_segment_rcv (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
           * retransmissions since we may not have any data to send */
          if (seq_leq (vnet_buffer (b)->tcp.seq_end, tc->rcv_nxt))
            {
-             tcp_program_ack (tc);
+             tcp_program_dupack (tc);
+             tc->errors.below_data_wnd++;
              error = TCP_ERROR_SEGMENT_OLD;
              goto done;
            }