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
c999d78c
Commit
c999d78c
authored
Oct 24, 2002
by
Sridhar Samudrala
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
cec4832c
549dc5a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
net/sctp/socket.c
net/sctp/socket.c
+9
-3
No files found.
net/sctp/socket.c
View file @
c999d78c
...
@@ -1240,6 +1240,9 @@ static inline int sctp_setsockopt_autoclose(struct sock *sk, char *optval,
...
@@ -1240,6 +1240,9 @@ static inline int sctp_setsockopt_autoclose(struct sock *sk, char *optval,
{
{
sctp_opt_t
*
sp
=
sctp_sk
(
sk
);
sctp_opt_t
*
sp
=
sctp_sk
(
sk
);
/* Applicable to UDP-style socket only */
if
(
SCTP_SOCKET_TCP
==
sp
->
type
)
return
-
EOPNOTSUPP
;
if
(
optlen
!=
sizeof
(
int
))
if
(
optlen
!=
sizeof
(
int
))
return
-
EINVAL
;
return
-
EINVAL
;
if
(
copy_from_user
(
&
sp
->
autoclose
,
optval
,
optlen
))
if
(
copy_from_user
(
&
sp
->
autoclose
,
optval
,
optlen
))
...
@@ -1595,6 +1598,9 @@ static inline int sctp_getsockopt_set_events(struct sock *sk, int len, char *opt
...
@@ -1595,6 +1598,9 @@ static inline int sctp_getsockopt_set_events(struct sock *sk, int len, char *opt
static
inline
int
sctp_getsockopt_autoclose
(
struct
sock
*
sk
,
int
len
,
char
*
optval
,
int
*
optlen
)
static
inline
int
sctp_getsockopt_autoclose
(
struct
sock
*
sk
,
int
len
,
char
*
optval
,
int
*
optlen
)
{
{
/* Applicable to UDP-style socket only */
if
(
SCTP_SOCKET_TCP
==
sctp_sk
(
sk
)
->
type
)
return
-
EOPNOTSUPP
;
if
(
len
!=
sizeof
(
int
))
if
(
len
!=
sizeof
(
int
))
return
-
EINVAL
;
return
-
EINVAL
;
if
(
copy_to_user
(
optval
,
&
sctp_sk
(
sk
)
->
autoclose
,
len
))
if
(
copy_to_user
(
optval
,
&
sctp_sk
(
sk
)
->
autoclose
,
len
))
...
@@ -1616,10 +1622,10 @@ SCTP_STATIC int sctp_do_peeloff(sctp_association_t *assoc, struct socket **newso
...
@@ -1616,10 +1622,10 @@ SCTP_STATIC int sctp_do_peeloff(sctp_association_t *assoc, struct socket **newso
int
err
=
0
;
int
err
=
0
;
/* An association cannot be branched off from an already peeled-off
/* An association cannot be branched off from an already peeled-off
* socket.
* socket
, nor is this supported for tcp style sockets
.
*/
*/
if
(
SCTP_SOCKET_UDP
_HIGH_BANDWIDTH
=
=
sctp_sk
(
oldsk
)
->
type
)
if
(
SCTP_SOCKET_UDP
!
=
sctp_sk
(
oldsk
)
->
type
)
return
-
E
INVAL
;
return
-
E
OPNOTSUPP
;
/* Create a new socket. */
/* Create a new socket. */
err
=
sock_create
(
PF_INET
,
SOCK_SEQPACKET
,
IPPROTO_SCTP
,
&
tmpsock
);
err
=
sock_create
(
PF_INET
,
SOCK_SEQPACKET
,
IPPROTO_SCTP
,
&
tmpsock
);
...
...
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