diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2007-12-20 17:11:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:59:23 -0500 |
commit | a08de64d074b36a56ee3bb985cd171281db78e96 (patch) | |
tree | 15b3c77a7078b5dc0510a23cc7d95922f7ad420a /net/sctp/sm_make_chunk.c | |
parent | ba8a06daed7d7c8785c92c343da9e202e6988fda (diff) |
[SCTP]: Update ASCONF processing to conform to spec.
The processing of the ASCONF chunks has changed a lot in the
spec. New items are:
1. A list of ASCONF-ACK chunks is now cached
2. The source of the packet is used in response.
3. New handling for unexpect ASCONF chunks.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 8138bbd93210..7fd6a6b68614 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -1275,6 +1275,9 @@ nodata: | |||
1275 | /* Release the memory occupied by a chunk. */ | 1275 | /* Release the memory occupied by a chunk. */ |
1276 | static void sctp_chunk_destroy(struct sctp_chunk *chunk) | 1276 | static void sctp_chunk_destroy(struct sctp_chunk *chunk) |
1277 | { | 1277 | { |
1278 | BUG_ON(!list_empty(&chunk->list)); | ||
1279 | list_del_init(&chunk->transmitted_list); | ||
1280 | |||
1278 | /* Free the chunk skb data and the SCTP_chunk stub itself. */ | 1281 | /* Free the chunk skb data and the SCTP_chunk stub itself. */ |
1279 | dev_kfree_skb(chunk->skb); | 1282 | dev_kfree_skb(chunk->skb); |
1280 | 1283 | ||
@@ -1285,9 +1288,6 @@ static void sctp_chunk_destroy(struct sctp_chunk *chunk) | |||
1285 | /* Possibly, free the chunk. */ | 1288 | /* Possibly, free the chunk. */ |
1286 | void sctp_chunk_free(struct sctp_chunk *chunk) | 1289 | void sctp_chunk_free(struct sctp_chunk *chunk) |
1287 | { | 1290 | { |
1288 | BUG_ON(!list_empty(&chunk->list)); | ||
1289 | list_del_init(&chunk->transmitted_list); | ||
1290 | |||
1291 | /* Release our reference on the message tracker. */ | 1291 | /* Release our reference on the message tracker. */ |
1292 | if (chunk->msg) | 1292 | if (chunk->msg) |
1293 | sctp_datamsg_put(chunk->msg); | 1293 | sctp_datamsg_put(chunk->msg); |
@@ -2980,11 +2980,9 @@ done: | |||
2980 | * after freeing the reference to old asconf ack if any. | 2980 | * after freeing the reference to old asconf ack if any. |
2981 | */ | 2981 | */ |
2982 | if (asconf_ack) { | 2982 | if (asconf_ack) { |
2983 | if (asoc->addip_last_asconf_ack) | ||
2984 | sctp_chunk_free(asoc->addip_last_asconf_ack); | ||
2985 | |||
2986 | sctp_chunk_hold(asconf_ack); | 2983 | sctp_chunk_hold(asconf_ack); |
2987 | asoc->addip_last_asconf_ack = asconf_ack; | 2984 | list_add_tail(&asconf_ack->transmitted_list, |
2985 | &asoc->asconf_ack_list); | ||
2988 | } | 2986 | } |
2989 | 2987 | ||
2990 | return asconf_ack; | 2988 | return asconf_ack; |