[SR-Dev] git:ser_core_cvs: sctp: empty sctp_handle_assoc_change added

Andrei Pelinescu-Onciul andrei at iptel.org
Thu Mar 5 18:33:52 CET 2009


Module: sip-router
Branch: ser_core_cvs
Commit: 7a6f43c829df5d3d2febe828581a0902fc4c10f1
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7a6f43c829df5d3d2febe828581a0902fc4c10f1

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Wed Mar  4 20:55:44 2009 +0000

sctp: empty  sctp_handle_assoc_change added

---

 sctp_server.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/sctp_server.c b/sctp_server.c
index 9b8688f..2a7a85d 100644
--- a/sctp_server.c
+++ b/sctp_server.c
@@ -663,6 +663,24 @@ static int sctp_handle_send_failed(struct socket_info* si,
 
 
 
+/* handle SCTP_ASOC_CHANGE notifications: map ser global sctp ids
+ * to kernel asoc_ids. The global ids are needed because the kernel ones
+ * might get reused after a close and so they are not unique for ser's
+ * lifetime. We need a unique id to match replies to the association on
+ * which we received the corresponding request (so that we can send them
+ * back on the same asoc & socket if still opened).
+ * returns 0 on success, -1 on failure
+ */
+static int sctp_handle_assoc_change(struct socket_info* si,
+									union sockaddr_union* su,
+									int state,
+									int assoc_id)
+{
+	return -1; /* failure, not implemented */
+}
+
+
+
 static int sctp_handle_notification(struct socket_info* si,
 									union sockaddr_union* su,
 									char* buf, unsigned len)
@@ -764,6 +782,8 @@ static int sctp_handle_notification(struct socket_info* si,
 				}
 			}
 #endif /* USE_DST_BLACKLIST */
+			sctp_handle_assoc_change(si, su, snp->sn_assoc_change.sac_state,
+										snp->sn_assoc_change.sac_assoc_id);
 			break;
 #ifdef SCTP_ADAPTION_INDICATION
 		case SCTP_ADAPTION_INDICATION:




More information about the sr-dev mailing list