aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sctp
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2007-05-04 16:55:27 -0400
committerDavid S. Miller <davem@davemloft.net>2007-05-04 16:55:27 -0400
commit07d939677166cc4f000c767196872a9becc2697b (patch)
treebef3d3c75ac3dd56813adbc63281feb4195a5b47 /include/net/sctp
parent827bf12236fbafc02bc899aec1b37c342c8cf4e5 (diff)
[SCTP]: Set assoc_id correctly during INIT collision.
During the INIT/COOKIE-ACK collision cases, it's possible to get into a situation where the association id is not yet set at the time of the user event generation. As a result, user events have an association id set to 0 which will confuse applications. This happens if we hit case B of duplicate cookie processing. In the particular example found and provided by Oscar Isaula <Oscar.Isaula@motorola.com>, flow looks like this: A B ---- INIT-------> (lost) <---------INIT------ ---- INIT-ACK---> <------ Cookie ECHO When the Cookie Echo is received, we end up trying to update the association that was created on A as a result of the (lost) INIT, but that association doesn't have the ID set yet. 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/command.h2
-rw-r--r--include/net/sctp/structs.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/include/net/sctp/command.h b/include/net/sctp/command.h
index 6114c4f54b0a..f56c8d695a82 100644
--- a/include/net/sctp/command.h
+++ b/include/net/sctp/command.h
@@ -100,6 +100,8 @@ typedef enum {
100 SCTP_CMD_T3_RTX_TIMERS_STOP, /* Stops T3-rtx pending timers */ 100 SCTP_CMD_T3_RTX_TIMERS_STOP, /* Stops T3-rtx pending timers */
101 SCTP_CMD_FORCE_PRIM_RETRAN, /* Forces retrans. over primary path. */ 101 SCTP_CMD_FORCE_PRIM_RETRAN, /* Forces retrans. over primary path. */
102 SCTP_CMD_SET_SK_ERR, /* Set sk_err */ 102 SCTP_CMD_SET_SK_ERR, /* Set sk_err */
103 SCTP_CMD_ASSOC_CHANGE, /* generate and send assoc_change event */
104 SCTP_CMD_ADAPTATION_IND, /* generate and send adaptation event */
103 SCTP_CMD_LAST 105 SCTP_CMD_LAST
104} sctp_verb_t; 106} sctp_verb_t;
105 107
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 7b4fff93ba7f..5e81984b8478 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1857,6 +1857,7 @@ int sctp_assoc_set_bind_addr_from_ep(struct sctp_association *,
1857int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *, 1857int sctp_assoc_set_bind_addr_from_cookie(struct sctp_association *,
1858 struct sctp_cookie*, 1858 struct sctp_cookie*,
1859 gfp_t gfp); 1859 gfp_t gfp);
1860int sctp_assoc_set_id(struct sctp_association *, gfp_t);
1860 1861
1861int sctp_cmp_addr_exact(const union sctp_addr *ss1, 1862int sctp_cmp_addr_exact(const union sctp_addr *ss1,
1862 const union sctp_addr *ss2); 1863 const union sctp_addr *ss2);