aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2007-12-20 17:11:47 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:59:23 -0500
commita08de64d074b36a56ee3bb985cd171281db78e96 (patch)
tree15b3c77a7078b5dc0510a23cc7d95922f7ad420a /include/net/sctp
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/sctp')
-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 8a0808eab811..fa87873fee76 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -744,6 +744,7 @@ struct sctp_chunk {
744 __u8 tsn_missing_report; /* Data chunk missing counter. */ 744 __u8 tsn_missing_report; /* Data chunk missing counter. */
745 __u8 data_accepted; /* At least 1 chunk in this packet accepted */ 745 __u8 data_accepted; /* At least 1 chunk in this packet accepted */
746 __u8 auth; /* IN: was auth'ed | OUT: needs auth */ 746 __u8 auth; /* IN: was auth'ed | OUT: needs auth */
747 __u8 has_asconf; /* IN: have seen an asconf before */
747}; 748};
748 749
749void sctp_chunk_hold(struct sctp_chunk *); 750void sctp_chunk_hold(struct sctp_chunk *);
@@ -1785,20 +1786,16 @@ struct sctp_association {
1785 */ 1786 */
1786 struct sctp_chunk *addip_last_asconf; 1787 struct sctp_chunk *addip_last_asconf;
1787 1788
1788 /* ADDIP Section 4.2 Upon reception of an ASCONF Chunk. 1789 /* ADDIP Section 5.2 Upon reception of an ASCONF Chunk.
1789 * 1790 *
1790 * IMPLEMENTATION NOTE: As an optimization a receiver may wish 1791 * This is needed to implement itmes E1 - E4 of the updated
1791 * to save the last ASCONF-ACK for some predetermined period 1792 * spec. Here is the justification:
1792 * of time and instead of re-processing the ASCONF (with the
1793 * same serial number) it may just re-transmit the
1794 * ASCONF-ACK. It may wish to use the arrival of a new serial
1795 * number to discard the previously saved ASCONF-ACK or any
1796 * other means it may choose to expire the saved ASCONF-ACK.
1797 * 1793 *
1798 * [This is our saved ASCONF-ACK. We invalidate it when a new 1794 * Since the peer may bundle multiple ASCONF chunks toward us,
1799 * ASCONF serial number arrives.] 1795 * we now need the ability to cache multiple ACKs. The section
1796 * describes in detail how they are cached and cleaned up.
1800 */ 1797 */
1801 struct sctp_chunk *addip_last_asconf_ack; 1798 struct list_head asconf_ack_list;
1802 1799
1803 /* These ASCONF chunks are waiting to be sent. 1800 /* These ASCONF chunks are waiting to be sent.
1804 * 1801 *
@@ -1947,6 +1944,11 @@ int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *,
1947 struct sctp_cookie*, 1944 struct sctp_cookie*,
1948 gfp_t gfp); 1945 gfp_t gfp);
1949int sctp_assoc_set_id(struct sctp_association *, gfp_t); 1946int sctp_assoc_set_id(struct sctp_association *, gfp_t);
1947void sctp_assoc_clean_asconf_ack_cache(const struct sctp_association *asoc);
1948struct sctp_chunk *sctp_assoc_lookup_asconf_ack(
1949 const struct sctp_association *asoc,
1950 __be32 serial);
1951
1950 1952
1951int sctp_cmp_addr_exact(const union sctp_addr *ss1, 1953int sctp_cmp_addr_exact(const union sctp_addr *ss1,
1952 const union sctp_addr *ss2); 1954 const union sctp_addr *ss2);