aboutsummaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2007-12-20 14:11:47 -0800
committerDavid S. Miller <davem@davemloft.net>2008-01-28 14:59:23 -0800
commita08de64d074b36a56ee3bb985cd171281db78e96 (patch)
tree15b3c77a7078b5dc0510a23cc7d95922f7ad420a /include/net
parentba8a06daed7d7c8785c92c343da9e202e6988fda (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 'include/net')
-rw-r--r--include/net/sctp/structs.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 8a0808eab81..fa87873fee7 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -744,6 +744,7 @@ struct sctp_chunk {
__u8 tsn_missing_report; /* Data chunk missing counter. */
__u8 data_accepted; /* At least 1 chunk in this packet accepted */
__u8 auth; /* IN: was auth'ed | OUT: needs auth */
+ __u8 has_asconf; /* IN: have seen an asconf before */
};
void sctp_chunk_hold(struct sctp_chunk *);
@@ -1785,20 +1786,16 @@ struct sctp_association {
*/
struct sctp_chunk *addip_last_asconf;
- /* ADDIP Section 4.2 Upon reception of an ASCONF Chunk.
+ /* ADDIP Section 5.2 Upon reception of an ASCONF Chunk.
*
- * IMPLEMENTATION NOTE: As an optimization a receiver may wish
- * to save the last ASCONF-ACK for some predetermined period
- * of time and instead of re-processing the ASCONF (with the
- * same serial number) it may just re-transmit the
- * ASCONF-ACK. It may wish to use the arrival of a new serial
- * number to discard the previously saved ASCONF-ACK or any
- * other means it may choose to expire the saved ASCONF-ACK.
+ * This is needed to implement itmes E1 - E4 of the updated
+ * spec. Here is the justification:
*
- * [This is our saved ASCONF-ACK. We invalidate it when a new
- * ASCONF serial number arrives.]
+ * Since the peer may bundle multiple ASCONF chunks toward us,
+ * we now need the ability to cache multiple ACKs. The section
+ * describes in detail how they are cached and cleaned up.
*/
- struct sctp_chunk *addip_last_asconf_ack;
+ struct list_head asconf_ack_list;
/* These ASCONF chunks are waiting to be sent.
*
@@ -1947,6 +1944,11 @@ int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *,
struct sctp_cookie*,
gfp_t gfp);
int sctp_assoc_set_id(struct sctp_association *, gfp_t);
+void sctp_assoc_clean_asconf_ack_cache(const struct sctp_association *asoc);
+struct sctp_chunk *sctp_assoc_lookup_asconf_ack(
+ const struct sctp_association *asoc,
+ __be32 serial);
+
int sctp_cmp_addr_exact(const union sctp_addr *ss1,
const union sctp_addr *ss2);