Browse code

sctp: empty sctp_handle_assoc_change added

Andrei Pelinescu-Onciul authored on 04/03/2009 20:55:44
Showing 1 changed files
... ...
@@ -663,6 +663,24 @@ static int sctp_handle_send_failed(struct socket_info* si,
663 663
 
664 664
 
665 665
 
666
+/* handle SCTP_ASOC_CHANGE notifications: map ser global sctp ids
667
+ * to kernel asoc_ids. The global ids are needed because the kernel ones
668
+ * might get reused after a close and so they are not unique for ser's
669
+ * lifetime. We need a unique id to match replies to the association on
670
+ * which we received the corresponding request (so that we can send them
671
+ * back on the same asoc & socket if still opened).
672
+ * returns 0 on success, -1 on failure
673
+ */
674
+static int sctp_handle_assoc_change(struct socket_info* si,
675
+									union sockaddr_union* su,
676
+									int state,
677
+									int assoc_id)
678
+{
679
+	return -1; /* failure, not implemented */
680
+}
681
+
682
+
683
+
666 684
 static int sctp_handle_notification(struct socket_info* si,
667 685
 									union sockaddr_union* su,
668 686
 									char* buf, unsigned len)
... ...
@@ -764,6 +782,8 @@ static int sctp_handle_notification(struct socket_info* si,
764 782
 				}
765 783
 			}
766 784
 #endif /* USE_DST_BLACKLIST */
785
+			sctp_handle_assoc_change(si, su, snp->sn_assoc_change.sac_state,
786
+										snp->sn_assoc_change.sac_assoc_id);
767 787
 			break;
768 788
 #ifdef SCTP_ADAPTION_INDICATION
769 789
 		case SCTP_ADAPTION_INDICATION: