aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/sm_statefuns.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-04-14 05:30:23 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-14 05:30:23 -0400
commitdf39e8ba56a788733d369068c7319e04b1da3cd5 (patch)
tree1e9be853bdb455e341cdbf957656f342cfa2eb9e /net/sctp/sm_statefuns.c
parentf5572855ec492334d8c3ec0e0e86c31865d5cf07 (diff)
parent159d83363b629c91d020734207c1bc788b96af5a (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/ehea/ehea_main.c drivers/net/wireless/iwlwifi/Kconfig drivers/net/wireless/rt2x00/rt61pci.c net/ipv4/inet_timewait_sock.c net/ipv6/raw.c net/mac80211/ieee80211_sta.c
Diffstat (limited to 'net/sctp/sm_statefuns.c')
-rw-r--r--net/sctp/sm_statefuns.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index 622284805500..0c9d5a6950fe 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -4138,6 +4138,24 @@ static sctp_disposition_t sctp_sf_abort_violation(
4138 goto nomem; 4138 goto nomem;
4139 4139
4140 if (asoc) { 4140 if (asoc) {
4141 /* Treat INIT-ACK as a special case during COOKIE-WAIT. */
4142 if (chunk->chunk_hdr->type == SCTP_CID_INIT_ACK &&
4143 !asoc->peer.i.init_tag) {
4144 sctp_initack_chunk_t *initack;
4145
4146 initack = (sctp_initack_chunk_t *)chunk->chunk_hdr;
4147 if (!sctp_chunk_length_valid(chunk,
4148 sizeof(sctp_initack_chunk_t)))
4149 abort->chunk_hdr->flags |= SCTP_CHUNK_FLAG_T;
4150 else {
4151 unsigned int inittag;
4152
4153 inittag = ntohl(initack->init_hdr.init_tag);
4154 sctp_add_cmd_sf(commands, SCTP_CMD_UPDATE_INITTAG,
4155 SCTP_U32(inittag));
4156 }
4157 }
4158
4141 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort)); 4159 sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort));
4142 SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS); 4160 SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS);
4143 4161
@@ -4343,6 +4361,7 @@ sctp_disposition_t sctp_sf_do_prm_asoc(const struct sctp_endpoint *ep,
4343 sctp_cmd_seq_t *commands) 4361 sctp_cmd_seq_t *commands)
4344{ 4362{
4345 struct sctp_chunk *repl; 4363 struct sctp_chunk *repl;
4364 struct sctp_association* my_asoc;
4346 4365
4347 /* The comment below says that we enter COOKIE-WAIT AFTER 4366 /* The comment below says that we enter COOKIE-WAIT AFTER
4348 * sending the INIT, but that doesn't actually work in our 4367 * sending the INIT, but that doesn't actually work in our
@@ -4366,8 +4385,8 @@ sctp_disposition_t sctp_sf_do_prm_asoc(const struct sctp_endpoint *ep,
4366 /* Cast away the const modifier, as we want to just 4385 /* Cast away the const modifier, as we want to just
4367 * rerun it through as a sideffect. 4386 * rerun it through as a sideffect.
4368 */ 4387 */
4369 sctp_add_cmd_sf(commands, SCTP_CMD_NEW_ASOC, 4388 my_asoc = (struct sctp_association *)asoc;
4370 SCTP_ASOC((struct sctp_association *) asoc)); 4389 sctp_add_cmd_sf(commands, SCTP_CMD_NEW_ASOC, SCTP_ASOC(my_asoc));
4371 4390
4372 /* Choose transport for INIT. */ 4391 /* Choose transport for INIT. */
4373 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_CHOOSE_TRANSPORT, 4392 sctp_add_cmd_sf(commands, SCTP_CMD_INIT_CHOOSE_TRANSPORT,