DORMANTno replies

[PATCH 2/5][SCTP]: Implement SCTP_ADDR_CONFIRMED state for ADDR_CHANGE event.

From: Sridhar Samudrala <hidden>
Date: 2007-02-17 03:39:52
Subsystem: networking [general], sctp protocol, the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Marcelo Ricardo Leitner, Xin Long, Linus Torvalds

[SCTP]: Implement SCTP_ADDR_CONFIRMED state for ADDR_CHANGE event.

Signed-off-by: Vlad Yasevich <redacted>
Signed-off-by: Sridhar Samudrala <redacted>

---
 include/net/sctp/user.h |    1 +
 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 e773160..36a319e 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -263,6 +263,7 @@ enum sctp_spc_state {
 	SCTP_ADDR_REMOVED,
 	SCTP_ADDR_ADDED,
 	SCTP_ADDR_MADE_PRIM,
+	SCTP_ADDR_CONFIRMED,
 };
 
 
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index fa82b73..294be94 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -714,8 +714,16 @@ void sctp_assoc_control_transport(struct
 	/* 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:

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help