summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2007-03-23 19:32:26 +0100
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 07:28:01 +0200
commit1ae4114dce35dd1d32ed847f60b599dbbdfd5829 (patch)
tree5a2b558cec2074a3e25ea23b1ba68564dd59e87b /net/sctp
parent[SCTP]: Implement SCTP_PARTIAL_DELIVERY_POINT option. (diff)
downloadlinux-1ae4114dce35dd1d32ed847f60b599dbbdfd5829.tar.xz
linux-1ae4114dce35dd1d32ed847f60b599dbbdfd5829.zip
[SCTP]: Implement SCTP_ADDR_CONFIRMED state for ADDR_CHNAGE event
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/associola.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 78d2ddb5ca18..85af1cb70fe8 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -714,8 +714,16 @@ void sctp_assoc_control_transport(struct sctp_association *asoc,
/* Record the transition on the transport. */
switch (command) {
case SCTP_TRANSPORT_UP:
+ /* If we are moving from UNCONFIRMED state due
+ * to heartbeat success, report the SCTP_ADDR_CONFIRMED
+ * state to the user, otherwise report SCTP_ADDR_AVAILABLE.
+ */
+ if (SCTP_UNCONFIRMED == transport->state &&
+ SCTP_HEARTBEAT_SUCCESS == error)
+ spc_state = SCTP_ADDR_CONFIRMED;
+ else
+ spc_state = SCTP_ADDR_AVAILABLE;
transport->state = SCTP_ACTIVE;
- spc_state = SCTP_ADDR_AVAILABLE;
break;
case SCTP_TRANSPORT_DOWN: