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
16321c0b
Commit
16321c0b
authored
Sep 02, 2003
by
Sridhar Samudrala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCTP] draft 07 API changes: Disable listening when backlog is 0.
parent
aca9dc23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
net/sctp/socket.c
net/sctp/socket.c
+20
-1
No files found.
net/sctp/socket.c
View file @
16321c0b
...
...
@@ -3346,9 +3346,19 @@ SCTP_STATIC int sctp_seqpacket_listen(struct sock *sk, int backlog)
if
(
!
sctp_style
(
sk
,
UDP
))
return
-
EINVAL
;
/* If backlog is zero, disable listening. */
if
(
!
backlog
)
{
if
(
sctp_sstate
(
sk
,
CLOSED
))
return
0
;
sctp_unhash_endpoint
(
ep
);
sk
->
sk_state
=
SCTP_SS_CLOSED
;
}
/* Return if we are already listening. */
if
(
sctp_sstate
(
sk
,
LISTENING
))
return
0
;
/*
* If a bind() or sctp_bindx() is not called prior to a listen()
* call that allows new associations to be accepted, the system
...
...
@@ -3379,6 +3389,15 @@ SCTP_STATIC int sctp_stream_listen(struct sock *sk, int backlog)
struct
sctp_opt
*
sp
=
sctp_sk
(
sk
);
struct
sctp_endpoint
*
ep
=
sp
->
ep
;
/* If backlog is zero, disable listening. */
if
(
!
backlog
)
{
if
(
sctp_sstate
(
sk
,
CLOSED
))
return
0
;
sctp_unhash_endpoint
(
ep
);
sk
->
sk_state
=
SCTP_SS_CLOSED
;
}
if
(
sctp_sstate
(
sk
,
LISTENING
))
return
0
;
...
...
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