Browse code

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).

Andrei Pelinescu-Onciul authored on 02/09/2011 08:22:35
Showing 1 changed files
... ...
@@ -2460,6 +2460,9 @@ int sctp_rcv_loop()
2460 2460
 				continue; /* goto skip;*/
2461 2461
 			else goto error;
2462 2462
 		}
2463
+		/* update the local config */
2464
+		cfg_update();
2465
+		
2463 2466
 		if (unlikely(msg.msg_flags & MSG_NOTIFICATION)){
2464 2467
 			/* intercept useful notifications */
2465 2468
 			sctp_handle_notification(bind_address, &ri.src_su, buf, len);
... ...
@@ -2518,8 +2521,6 @@ int sctp_rcv_loop()
2518 2518
 #ifdef USE_COMP
2519 2519
 		ri.comp=COMP_NONE;
2520 2520
 #endif
2521
-		/* update the local config */
2522
-		cfg_update();
2523 2521
 #ifdef SCTP_CONN_REUSE
2524 2522
 		if (likely(cfg_get(sctp, sctp_cfg, assoc_tracking) && sinfo)){
2525 2523
 			ri.proto_reserved1 = sctp_con_track(sinfo->sinfo_assoc_id,