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
Kirill Smelkov
linux
Commits
f9459cbc
Commit
f9459cbc
authored
20 years ago
by
Sridhar Samudrala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCTP] Fix SCTP_INITMSG set socket option so that a parameter with 0
value will not change its current value.
parent
403e8fa0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
net/sctp/socket.c
net/sctp/socket.c
+14
-1
No files found.
net/sctp/socket.c
View file @
f9459cbc
...
...
@@ -1683,10 +1683,23 @@ static int sctp_setsockopt_peer_addr_params(struct sock *sk,
*/
static
int
sctp_setsockopt_initmsg
(
struct
sock
*
sk
,
char
*
optval
,
int
optlen
)
{
struct
sctp_initmsg
sinit
;
struct
sctp_opt
*
sp
=
sctp_sk
(
sk
);
if
(
optlen
!=
sizeof
(
struct
sctp_initmsg
))
return
-
EINVAL
;
if
(
copy_from_user
(
&
s
ctp_sk
(
sk
)
->
initmsg
,
optval
,
optlen
))
if
(
copy_from_user
(
&
s
init
,
optval
,
optlen
))
return
-
EFAULT
;
if
(
sinit
.
sinit_num_ostreams
)
sp
->
initmsg
.
sinit_num_ostreams
=
sinit
.
sinit_num_ostreams
;
if
(
sinit
.
sinit_max_instreams
)
sp
->
initmsg
.
sinit_max_instreams
=
sinit
.
sinit_max_instreams
;
if
(
sinit
.
sinit_max_attempts
)
sp
->
initmsg
.
sinit_max_attempts
=
sinit
.
sinit_max_attempts
;
if
(
sinit
.
sinit_max_init_timeo
)
sp
->
initmsg
.
sinit_max_init_timeo
=
sinit
.
sinit_max_init_timeo
;
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
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