Date: Tue, 1 Nov 2016 22:40:25 +0000 (UTC) From: Hiren Panchasara <hiren@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r308184 - stable/11/sys/netinet Message-ID: <201611012240.uA1MePvH073524@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hiren Date: Tue Nov 1 22:40:25 2016 New Revision: 308184 URL: https://svnweb.freebsd.org/changeset/base/308184 Log: MFC r307545 Make sure tcp_mss() has the same check as tcp_mss_update() to have t_maxseg set to at least 64. This is still just a coverup to avoid kernel panic and not an actual fix. PR: 213232 Sponsored by: Limelight Networks Modified: stable/11/sys/netinet/tcp_input.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netinet/tcp_input.c ============================================================================== --- stable/11/sys/netinet/tcp_input.c Tue Nov 1 22:38:26 2016 (r308183) +++ stable/11/sys/netinet/tcp_input.c Tue Nov 1 22:40:25 2016 (r308184) @@ -3754,7 +3754,15 @@ tcp_mss(struct tcpcb *tp, int offer) (void)sbreserve_locked(&so->so_snd, bufsize, so, NULL); } SOCKBUF_UNLOCK(&so->so_snd); - tp->t_maxseg = mss; + /* + * Sanity check: make sure that maxseg will be large + * enough to allow some data on segments even if the + * all the option space is used (40bytes). Otherwise + * funny things may happen in tcp_output. + * + * XXXGL: shouldn't we reserve space for IP/IPv6 options? + */ + tp->t_maxseg = max(mss, 64); SOCKBUF_LOCK(&so->so_rcv); if ((so->so_rcv.sb_hiwat == V_tcp_recvspace) && metrics.rmx_recvpipe)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611012240.uA1MePvH073524>