Limit the maximum permissible TCP window size to 65535 octets if
window scaling is disabled. PR: kern/16914 Submitted by: Jayanth Vijayaraghavan <jayanth@yahoo-inc.com> Reviewed by: wollman Approved by: jkh
This commit is contained in:
parent
5bf514a380
commit
f885f63606
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57576
@ -314,8 +314,11 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags)
|
||||
ipov = ipgen;
|
||||
|
||||
if (tp) {
|
||||
if (!(flags & TH_RST))
|
||||
if (!(flags & TH_RST)) {
|
||||
win = sbspace(&tp->t_inpcb->inp_socket->so_rcv);
|
||||
if (win > (long)TCP_MAXWIN << tp->rcv_scale)
|
||||
win = (long)TCP_MAXWIN << tp->rcv_scale;
|
||||
}
|
||||
#ifdef INET6
|
||||
if (isipv6)
|
||||
ro6 = &tp->t_inpcb->in6p_route;
|
||||
|
@ -314,8 +314,11 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags)
|
||||
ipov = ipgen;
|
||||
|
||||
if (tp) {
|
||||
if (!(flags & TH_RST))
|
||||
if (!(flags & TH_RST)) {
|
||||
win = sbspace(&tp->t_inpcb->inp_socket->so_rcv);
|
||||
if (win > (long)TCP_MAXWIN << tp->rcv_scale)
|
||||
win = (long)TCP_MAXWIN << tp->rcv_scale;
|
||||
}
|
||||
#ifdef INET6
|
||||
if (isipv6)
|
||||
ro6 = &tp->t_inpcb->in6p_route;
|
||||
|
Loading…
Reference in New Issue
Block a user