diff options
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r-- | net/sctp/associola.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index ee4b212e66b1..3bdd8dcb76a7 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -415,6 +415,9 @@ void sctp_association_free(struct sctp_association *asoc) | |||
415 | 415 | ||
416 | /* Free peer's cached cookie. */ | 416 | /* Free peer's cached cookie. */ |
417 | kfree(asoc->peer.cookie); | 417 | kfree(asoc->peer.cookie); |
418 | kfree(asoc->peer.peer_random); | ||
419 | kfree(asoc->peer.peer_chunks); | ||
420 | kfree(asoc->peer.peer_hmacs); | ||
418 | 421 | ||
419 | /* Release the transport structures. */ | 422 | /* Release the transport structures. */ |
420 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { | 423 | list_for_each_safe(pos, temp, &asoc->peer.transport_addr_list) { |
@@ -1145,7 +1148,23 @@ void sctp_assoc_update(struct sctp_association *asoc, | |||
1145 | } | 1148 | } |
1146 | } | 1149 | } |
1147 | 1150 | ||
1148 | /* SCTP-AUTH: XXX something needs to be done here*/ | 1151 | /* SCTP-AUTH: Save the peer parameters from the new assocaitions |
1152 | * and also move the association shared keys over | ||
1153 | */ | ||
1154 | kfree(asoc->peer.peer_random); | ||
1155 | asoc->peer.peer_random = new->peer.peer_random; | ||
1156 | new->peer.peer_random = NULL; | ||
1157 | |||
1158 | kfree(asoc->peer.peer_chunks); | ||
1159 | asoc->peer.peer_chunks = new->peer.peer_chunks; | ||
1160 | new->peer.peer_chunks = NULL; | ||
1161 | |||
1162 | kfree(asoc->peer.peer_hmacs); | ||
1163 | asoc->peer.peer_hmacs = new->peer.peer_hmacs; | ||
1164 | new->peer.peer_hmacs = NULL; | ||
1165 | |||
1166 | sctp_auth_key_put(asoc->asoc_shared_key); | ||
1167 | sctp_auth_asoc_init_active_key(asoc, GFP_ATOMIC); | ||
1149 | } | 1168 | } |
1150 | 1169 | ||
1151 | /* Update the retran path for sending a retransmitted packet. | 1170 | /* Update the retran path for sending a retransmitted packet. |