[sr-dev] git:3.1: sctp: update the cfg before handling notifications

Daniel-Constantin Mierla miconda at gmail.com
Tue Sep 13 23:15:14 CEST 2011


Module: sip-router
Branch: 3.1
Commit: 39387157697847f6cb87531956a9da7c3c4e530d
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=39387157697847f6cb87531956a9da7c3c4e530d

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Fri Sep  2 10:22:35 2011 +0200

sctp: update the cfg before handling notifications

Update the local config immediately after successfully reading
a message (before processing notifications, since some of the
notifications processing makes use of cfg values).
(cherry picked from commit 5813703a7931f288b95840b9a93c628773c33a03)

---

 sctp_server.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/sctp_server.c b/sctp_server.c
index cfd7015..fbe83ea 100644
--- a/sctp_server.c
+++ b/sctp_server.c
@@ -2460,6 +2460,9 @@ int sctp_rcv_loop()
 				continue; /* goto skip;*/
 			else goto error;
 		}
+		/* update the local config */
+		cfg_update();
+		
 		if (unlikely(msg.msg_flags & MSG_NOTIFICATION)){
 			/* intercept useful notifications */
 			sctp_handle_notification(bind_address, &ri.src_su, buf, len);
@@ -2518,8 +2521,6 @@ int sctp_rcv_loop()
 #ifdef USE_COMP
 		ri.comp=COMP_NONE;
 #endif
-		/* update the local config */
-		cfg_update();
 #ifdef SCTP_CONN_REUSE
 		if (likely(cfg_get(sctp, sctp_cfg, assoc_tracking) && sinfo)){
 			ri.proto_reserved1 = sctp_con_track(sinfo->sinfo_assoc_id,




More information about the sr-dev mailing list