From 04fd70b7f27ee67ca987564f0b1be9067c7c2b23 Mon Sep 17 00:00:00 2001 From: pkelsey Date: Tue, 21 Jul 2015 18:38:31 +0000 Subject: MFC r285567: Check TCP timestamp option flag so that the automatic receive buffer scaling code does not use an uninitialized timestamp echo reply value from the stack when timestamps are not enabled. Approved by: re (gjb) --- sys/netinet/tcp_input.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/netinet') diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 7918252..6af5c9c 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1801,6 +1801,7 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, * the buffer to better manage the socket buffer resources. */ if (V_tcp_do_autorcvbuf && + (to.to_flags & TOF_TS) && to.to_tsecr && (so->so_rcv.sb_flags & SB_AUTOSIZE)) { if (TSTMP_GT(to.to_tsecr, tp->rfbuf_ts) && -- cgit v1.1