Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88307
b: refs/heads/master
c: f4ad85c
h: refs/heads/master
i:
  88305: 694e937
  88303: 2edba1b
v: v3
  • Loading branch information
Gui Jianfeng authored and David S. Miller committed Apr 13, 2008
1 parent 70935d7 commit 91d0654
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 72da7b3860cabf427590b4982bc880bafab4d5c8
refs/heads/master: f4ad85ca3ef8a1ede76c5020a28a8f4057b4d24f
1 change: 1 addition & 0 deletions trunk/include/net/sctp/command.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ typedef enum {
SCTP_CMD_ADAPTATION_IND, /* generate and send adaptation event */
SCTP_CMD_ASSOC_SHKEY, /* generate the association shared keys */
SCTP_CMD_T1_RETRAN, /* Mark for retransmission after T1 timeout */
SCTP_CMD_UPDATE_INITTAG, /* Update peer inittag */
SCTP_CMD_LAST
} sctp_verb_t;

Expand Down
3 changes: 3 additions & 0 deletions trunk/net/sctp/outqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,9 @@ int sctp_outq_flush(struct sctp_outq *q, int rtx_timeout)
break;

case SCTP_CID_ABORT:
if (sctp_test_T_bit(chunk)) {
packet->vtag = asoc->c.my_vtag;
}
case SCTP_CID_SACK:
case SCTP_CID_HEARTBEAT:
case SCTP_CID_HEARTBEAT_ACK:
Expand Down
3 changes: 3 additions & 0 deletions trunk/net/sctp/sm_sideeffect.c
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,9 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
error = sctp_auth_asoc_init_active_key(asoc,
GFP_ATOMIC);
break;
case SCTP_CMD_UPDATE_INITTAG:
asoc->peer.i.init_tag = cmd->obj.u32;
break;

default:
printk(KERN_WARNING "Impossible command: %u, %p\n",
Expand Down
18 changes: 18 additions & 0 deletions trunk/net/sctp/sm_statefuns.c
Original file line number Diff line number Diff line change
Expand Up @@ -4144,6 +4144,24 @@ static sctp_disposition_t sctp_sf_abort_violation(
goto nomem;

if (asoc) {
/* Treat INIT-ACK as a special case during COOKIE-WAIT. */
if (chunk->chunk_hdr->type == SCTP_CID_INIT_ACK &&
!asoc->peer.i.init_tag) {
sctp_initack_chunk_t *initack;

initack = (sctp_initack_chunk_t *)chunk->chunk_hdr;
if (!sctp_chunk_length_valid(chunk,
sizeof(sctp_initack_chunk_t)))
abort->chunk_hdr->flags |= SCTP_CHUNK_FLAG_T;
else {
unsigned int inittag;

inittag = ntohl(initack->init_hdr.init_tag);
sctp_add_cmd_sf(commands, SCTP_CMD_UPDATE_INITTAG,
SCTP_U32(inittag));
}
}

sctp_add_cmd_sf(commands, SCTP_CMD_REPLY, SCTP_CHUNK(abort));
SCTP_INC_STATS(SCTP_MIB_OUTCTRLCHUNKS);

Expand Down

0 comments on commit 91d0654

Please sign in to comment.