+/**
+ * Update tsval recent
+ */
+always_inline void
+tcp_update_timestamp (tcp_connection_t * tc, u32 seq, u32 seq_end)
+{
+ /*
+ * RFC1323: If Last.ACK.sent falls within the range of sequence numbers
+ * of an incoming segment:
+ * SEG.SEQ <= Last.ACK.sent < SEG.SEQ + SEG.LEN
+ * then the TSval from the segment is copied to TS.Recent;
+ * otherwise, the TSval is ignored.
+ */
+ if (tcp_opts_tstamp (&tc->opt) && tc->tsval_recent
+ && seq_leq (seq, tc->rcv_las) && seq_leq (tc->rcv_las, seq_end))
+ {
+ tc->tsval_recent = tc->opt.tsval;
+ tc->tsval_recent_age = tcp_time_now ();
+ }
+}
+