projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
86d81c5
)
tcp: Stringent TSO segment length assertion.
author
Sepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 16 Aug 2012 02:31:31 +0000 (10:31 +0800)
committer
Sepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 16 Aug 2012 02:32:02 +0000 (10:32 +0800)
sys/netinet/tcp_output.c
patch
|
blob
|
blame
|
history
diff --git
a/sys/netinet/tcp_output.c
b/sys/netinet/tcp_output.c
index
d3d6a0f
..
a99cbbd
100644
(file)
--- a/
sys/netinet/tcp_output.c
+++ b/
sys/netinet/tcp_output.c
@@
-771,7
+771,8
@@
send:
#endif
if (use_tso) {
- KASSERT(len > segsz,
+ /* TSO segment length must be multiple of segment size */
+ KASSERT(len >= (2 * segsz) && (len % segsz == 0),
("invalid TSO len %ld, segsz %u", len, segsz));
} else {
KASSERT(len <= segsz,