Module Name: src
Committed By: maxv
Date: Wed May 23 18:40:30 UTC 2018
Modified Files:
src/sys/netinet: tcp_subr.c
Log Message:
Add XXX.
To generate a diff of this commit:
cvs rdiff -u -r1.279 -r1.280 src/sys/netinet/tcp_subr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/netinet/tcp_subr.c
diff -u src/sys/netinet/tcp_subr.c:1.279 src/sys/netinet/tcp_subr.c:1.280
--- src/sys/netinet/tcp_subr.c:1.279 Thu May 3 07:13:48 2018
+++ src/sys/netinet/tcp_subr.c Wed May 23 18:40:29 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: tcp_subr.c,v 1.279 2018/05/03 07:13:48 maxv Exp $ */
+/* $NetBSD: tcp_subr.c,v 1.280 2018/05/23 18:40:29 maxv Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_subr.c,v 1.279 2018/05/03 07:13:48 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_subr.c,v 1.280 2018/05/23 18:40:29 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1918,6 +1918,10 @@ tcp_mss_from_peer(struct tcpcb *tp, int
if (tp->t_in6pcb)
mss -= ip6_optlen(tp->t_in6pcb);
#endif
+ /*
+ * XXX XXX What if mss goes negative or zero? This can happen if a
+ * socket has large IPv6 options. We crash below.
+ */
/*
* If there's a pipesize, change the socket buffer to that size.