diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2007-09-16 22:32:11 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:51:30 -0400 |
commit | 730fc3d05cd4ba4c9ce2de91f3d43349e95dbbf5 (patch) | |
tree | 50a59c6592a7546f9d54364f26dc2a03f5f18345 /net/sctp/associola.c | |
parent | a29a5bd4f5c3e8ba2e89688feab8b01c44f1654f (diff) |
[SCTP]: Implete SCTP-AUTH parameter processing
Implement processing for the CHUNKS, RANDOM, and HMAC parameters and
deal with how this parameters are effected by association restarts.
In particular, during unexpeted INIT processing, we need to reply with
parameters from the original INIT chunk. Also, after restart, we need
to update the old association with new peer parameters and change the
association shared keys.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
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. |