diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2007-03-23 14:32:26 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:01 -0400 |
commit | 1ae4114dce35dd1d32ed847f60b599dbbdfd5829 (patch) | |
tree | 5a2b558cec2074a3e25ea23b1ba68564dd59e87b | |
parent | d49d91d79a8dc5e85108a5ae1c8eef23dec135c1 (diff) |
[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>
-rw-r--r-- | include/net/sctp/user.h | 1 | ||||
-rw-r--r-- | net/sctp/associola.c | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index 9a8352710631..4ed752119bbc 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h | |||
@@ -265,6 +265,7 @@ enum sctp_spc_state { | |||
265 | SCTP_ADDR_REMOVED, | 265 | SCTP_ADDR_REMOVED, |
266 | SCTP_ADDR_ADDED, | 266 | SCTP_ADDR_ADDED, |
267 | SCTP_ADDR_MADE_PRIM, | 267 | SCTP_ADDR_MADE_PRIM, |
268 | SCTP_ADDR_CONFIRMED, | ||
268 | }; | 269 | }; |
269 | 270 | ||
270 | 271 | ||
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, | |||
714 | /* Record the transition on the transport. */ | 714 | /* Record the transition on the transport. */ |
715 | switch (command) { | 715 | switch (command) { |
716 | case SCTP_TRANSPORT_UP: | 716 | case SCTP_TRANSPORT_UP: |
717 | /* If we are moving from UNCONFIRMED state due | ||
718 | * to heartbeat success, report the SCTP_ADDR_CONFIRMED | ||
719 | * state to the user, otherwise report SCTP_ADDR_AVAILABLE. | ||
720 | */ | ||
721 | if (SCTP_UNCONFIRMED == transport->state && | ||
722 | SCTP_HEARTBEAT_SUCCESS == error) | ||
723 | spc_state = SCTP_ADDR_CONFIRMED; | ||
724 | else | ||
725 | spc_state = SCTP_ADDR_AVAILABLE; | ||
717 | transport->state = SCTP_ACTIVE; | 726 | transport->state = SCTP_ACTIVE; |
718 | spc_state = SCTP_ADDR_AVAILABLE; | ||
719 | break; | 727 | break; |
720 | 728 | ||
721 | case SCTP_TRANSPORT_DOWN: | 729 | case SCTP_TRANSPORT_DOWN: |