Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
02bc27cb
Commit
02bc27cb
authored
Jul 22, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TCP]: Do not overflow 16-bit window field in tcp_select_window().
Signed-off-by:
David S. Miller
<
davem@redhat.com
>
parent
c5de793d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
net/ipv4/tcp_output.c
net/ipv4/tcp_output.c
+8
-0
No files found.
net/ipv4/tcp_output.c
View file @
02bc27cb
...
@@ -168,6 +168,14 @@ static __inline__ u16 tcp_select_window(struct sock *sk)
...
@@ -168,6 +168,14 @@ static __inline__ u16 tcp_select_window(struct sock *sk)
tp
->
rcv_wnd
=
new_win
;
tp
->
rcv_wnd
=
new_win
;
tp
->
rcv_wup
=
tp
->
rcv_nxt
;
tp
->
rcv_wup
=
tp
->
rcv_nxt
;
/* Make sure we do not exceed the maximum possible
* scaled window.
*/
if
(
!
tp
->
rcv_wscale
)
new_win
=
min
(
new_win
,
MAX_TCP_WINDOW
);
else
new_win
=
min
(
new_win
,
(
65535U
<<
tp
->
rcv_wscale
));
/* RFC1323 scaling applied */
/* RFC1323 scaling applied */
new_win
>>=
tp
->
rcv_wscale
;
new_win
>>=
tp
->
rcv_wscale
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment