summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2006-09-28 13:59:26 +0000
committerandre <andre@FreeBSD.org>2006-09-28 13:59:26 +0000
commit3119a75f5a0277365032bf5d5af3bd900c0fb1b8 (patch)
treea7f68e468e1061f1fd5a79991ac31b0dfe0c49b4 /sys/netinet/tcp_output.c
parent631a4a40d03b4b5f0cdf799f80f33b805a54f452 (diff)
downloadFreeBSD-src-3119a75f5a0277365032bf5d5af3bd900c0fb1b8.zip
FreeBSD-src-3119a75f5a0277365032bf5d5af3bd900c0fb1b8.tar.gz
When doing TSO correctly do the check to prevent a maximum sized IP packet
from overflowing.
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index dc67a5d..0ea53e2 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -739,7 +739,7 @@ send:
if (len + optlen + ipoptlen > tp->t_maxopd) {
flags &= ~TH_FIN;
if (tso) {
- if (len > TCP_MAXWIN) {
+ if (len > TCP_MAXWIN - hdrlen) {
len = TCP_MAXWIN - hdrlen;
len = len - (len % (tp->t_maxopd - optlen));
sendalot = 1;
OpenPOWER on IntegriCloud