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
146b6f89
Commit
146b6f89
authored
Jun 02, 2003
by
Jon Grimm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCTP] sctp_jitter() needs to protect against div by 0.
User can configure rto_initial to zero... we go boom.
parent
5308e103
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
include/net/sctp/sctp.h
include/net/sctp/sctp.h
+4
-0
No files found.
include/net/sctp/sctp.h
View file @
146b6f89
...
@@ -417,6 +417,10 @@ static inline __s32 sctp_jitter(__u32 rto)
...
@@ -417,6 +417,10 @@ static inline __s32 sctp_jitter(__u32 rto)
static
__u32
sctp_rand
;
static
__u32
sctp_rand
;
__s32
ret
;
__s32
ret
;
/* Avoid divide by zero. */
if
(
!
rto
)
rto
=
1
;
sctp_rand
+=
jiffies
;
sctp_rand
+=
jiffies
;
sctp_rand
^=
(
sctp_rand
<<
12
);
sctp_rand
^=
(
sctp_rand
<<
12
);
sctp_rand
^=
(
sctp_rand
>>
20
);
sctp_rand
^=
(
sctp_rand
>>
20
);
...
...
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