Skip to content

Commit

Permalink
[SCTP]: Implement SCTP_ADDR_CONFIRMED state for ADDR_CHNAGE event
Browse files Browse the repository at this point in the history
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vlad Yasevich authored and David S. Miller committed Apr 26, 2007
1 parent d49d91d commit 1ae4114
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/net/sctp/user.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ enum sctp_spc_state {
SCTP_ADDR_REMOVED,
SCTP_ADDR_ADDED,
SCTP_ADDR_MADE_PRIM,
SCTP_ADDR_CONFIRMED,
};


Expand Down
10 changes: 9 additions & 1 deletion net/sctp/associola.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1ae4114

Please sign in to comment.