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
984c6c43
Commit
984c6c43
authored
Apr 16, 2003
by
Sridhar Samudrala
Browse files
Options
Browse Files
Download
Plain Diff
Merge us.ibm.com:/home/sridhar/BK/lksctp-2.5.work
into us.ibm.com:/home/sridhar/BK/lksctp-2.5.67
parents
2dd53b84
99ab9689
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
11 deletions
+53
-11
net/sctp/ipv6.c
net/sctp/ipv6.c
+1
-0
net/sctp/protocol.c
net/sctp/protocol.c
+1
-0
net/sctp/sm_sideeffect.c
net/sctp/sm_sideeffect.c
+16
-8
net/sctp/socket.c
net/sctp/socket.c
+35
-3
No files found.
net/sctp/ipv6.c
View file @
984c6c43
...
...
@@ -518,6 +518,7 @@ struct sock *sctp_v6_create_accept_sk(struct sock *sk,
newsk
->
family
=
PF_INET6
;
newsk
->
protocol
=
IPPROTO_SCTP
;
newsk
->
backlog_rcv
=
sk
->
prot
->
backlog_rcv
;
newsk
->
shutdown
=
sk
->
shutdown
;
newsctp6sk
=
(
struct
sctp6_sock
*
)
newsk
;
newsctp6sk
->
pinet6
=
&
newsctp6sk
->
inet6
;
...
...
net/sctp/protocol.c
View file @
984c6c43
...
...
@@ -516,6 +516,7 @@ struct sock *sctp_v4_create_accept_sk(struct sock *sk,
newsk
->
prot
=
sk
->
prot
;
newsk
->
no_check
=
sk
->
no_check
;
newsk
->
reuse
=
sk
->
reuse
;
newsk
->
shutdown
=
sk
->
shutdown
;
newsk
->
destruct
=
inet_sock_destruct
;
newsk
->
zapped
=
0
;
...
...
net/sctp/sm_sideeffect.c
View file @
984c6c43
...
...
@@ -617,8 +617,23 @@ static void sctp_cmd_new_state(sctp_cmd_seq_t *cmds, struct sctp_association *as
asoc
->
state
=
state
;
asoc
->
state_timestamp
=
jiffies
;
if
(
SCTP_SOCKET_TCP
==
sp
->
type
)
{
/* Change the sk->state of a TCP-style socket that has
* sucessfully completed a connect() call.
*/
if
((
SCTP_STATE_ESTABLISHED
==
asoc
->
state
)
&&
(
SCTP_SS_CLOSED
==
sk
->
state
))
sk
->
state
=
SCTP_SS_ESTABLISHED
;
/* Set the RCV_SHUTDOWN flag when a SHUTDOWN is received. */
if
(
SCTP_STATE_SHUTDOWN_RECEIVED
==
asoc
->
state
)
sk
->
shutdown
|=
RCV_SHUTDOWN
;
}
if
((
SCTP_STATE_ESTABLISHED
==
asoc
->
state
)
||
(
SCTP_STATE_CLOSED
==
asoc
->
state
))
{
(
SCTP_STATE_CLOSED
==
asoc
->
state
)
||
(
SCTP_STATE_SHUTDOWN_RECEIVED
==
asoc
->
state
))
{
/* Wake up any processes waiting in the asoc's wait queue in
* sctp_wait_for_connect() or sctp_wait_for_sndbuf().
*/
...
...
@@ -634,13 +649,6 @@ static void sctp_cmd_new_state(sctp_cmd_seq_t *cmds, struct sctp_association *as
if
(
SCTP_SOCKET_UDP
!=
sp
->
type
)
sk
->
state_change
(
sk
);
}
/* Change the sk->state of a TCP-style socket that has sucessfully
* completed a connect() call.
*/
if
((
SCTP_STATE_ESTABLISHED
==
asoc
->
state
)
&&
(
SCTP_SOCKET_TCP
==
sp
->
type
)
&&
(
SCTP_SS_CLOSED
==
sk
->
state
))
sk
->
state
=
SCTP_SS_ESTABLISHED
;
}
/* These three macros allow us to pull the debugging code out of the
...
...
net/sctp/socket.c
View file @
984c6c43
...
...
@@ -1864,11 +1864,38 @@ SCTP_STATIC int sctp_destroy_sock(struct sock *sk)
return
0
;
}
/* FIXME: Comments needed. */
/* API 4.1.7 shutdown() - TCP Style Syntax
* int shutdown(int socket, int how);
*
* sd - the socket descriptor of the association to be closed.
* how - Specifies the type of shutdown. The values are
* as follows:
* SHUT_RD
* Disables further receive operations. No SCTP
* protocol action is taken.
* SHUT_WR
* Disables further send operations, and initiates
* the SCTP shutdown sequence.
* SHUT_RDWR
* Disables further send and receive operations
* and initiates the SCTP shutdown sequence.
*/
SCTP_STATIC
void
sctp_shutdown
(
struct
sock
*
sk
,
int
how
)
{
/* UDP-style sockets do not support shutdown. */
/* STUB */
struct
sctp_endpoint
*
ep
;
struct
sctp_association
*
asoc
;
if
(
SCTP_SOCKET_TCP
!=
sctp_sk
(
sk
)
->
type
)
return
;
if
(
how
&
SEND_SHUTDOWN
)
{
ep
=
sctp_sk
(
sk
)
->
ep
;
if
(
!
list_empty
(
&
ep
->
asocs
))
{
asoc
=
list_entry
(
ep
->
asocs
.
next
,
struct
sctp_association
,
asocs
);
sctp_primitive_SHUTDOWN
(
asoc
,
NULL
);
}
}
}
/* 7.2.1 Association Status (SCTP_STATUS)
...
...
@@ -3145,6 +3172,9 @@ static struct sk_buff *sctp_skb_recv_datagram(struct sock *sk, int flags,
if
(
skb
)
return
skb
;
if
(
sk
->
shutdown
&
RCV_SHUTDOWN
)
break
;
/* User doesn't want to wait. */
error
=
-
EAGAIN
;
if
(
!
timeo
)
...
...
@@ -3379,6 +3409,8 @@ static int sctp_wait_for_connect(struct sctp_association *asoc, long *timeo_p)
__set_current_state
(
TASK_INTERRUPTIBLE
);
if
(
!*
timeo_p
)
goto
do_nonblock
;
if
(
sk
->
shutdown
&
RCV_SHUTDOWN
)
break
;
if
(
sk
->
err
||
asoc
->
state
>=
SCTP_STATE_SHUTDOWN_PENDING
||
asoc
->
base
.
dead
)
goto
do_error
;
...
...
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