diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2007-03-23 14:34:08 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:03 -0400 |
commit | a5a35e76753d27e782028843a5186f176b50dd16 (patch) | |
tree | 229cd1440150deca3893774dd837e901e88af960 /net/sctp/sm_sideeffect.c | |
parent | bdf3092af601ccad765974652ab103162fbe14f4 (diff) |
[SCTP]: Implement sac_info field in SCTP_ASSOC_CHANGE notification.
As stated in the sctp socket api draft:
sac_info: variable
If the sac_state is SCTP_COMM_LOST and an ABORT chunk was received
for this association, sac_info[] contains the complete ABORT chunk as
defined in the SCTP specification RFC2960 [RFC2960] section 3.3.7.
We now save received ABORT chunks into the sac_info field and pass that
to the user.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/sm_sideeffect.c')
-rw-r--r-- | net/sctp/sm_sideeffect.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 135567493119..0a1a197193a2 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -464,7 +464,7 @@ static void sctp_cmd_init_failed(sctp_cmd_seq_t *commands, | |||
464 | struct sctp_ulpevent *event; | 464 | struct sctp_ulpevent *event; |
465 | 465 | ||
466 | event = sctp_ulpevent_make_assoc_change(asoc,0, SCTP_CANT_STR_ASSOC, | 466 | event = sctp_ulpevent_make_assoc_change(asoc,0, SCTP_CANT_STR_ASSOC, |
467 | (__u16)error, 0, 0, | 467 | (__u16)error, 0, 0, NULL, |
468 | GFP_ATOMIC); | 468 | GFP_ATOMIC); |
469 | 469 | ||
470 | if (event) | 470 | if (event) |
@@ -492,8 +492,13 @@ static void sctp_cmd_assoc_failed(sctp_cmd_seq_t *commands, | |||
492 | /* Cancel any partial delivery in progress. */ | 492 | /* Cancel any partial delivery in progress. */ |
493 | sctp_ulpq_abort_pd(&asoc->ulpq, GFP_ATOMIC); | 493 | sctp_ulpq_abort_pd(&asoc->ulpq, GFP_ATOMIC); |
494 | 494 | ||
495 | event = sctp_ulpevent_make_assoc_change(asoc, 0, SCTP_COMM_LOST, | 495 | if (event_type == SCTP_EVENT_T_CHUNK && subtype.chunk == SCTP_CID_ABORT) |
496 | (__u16)error, 0, 0, | 496 | event = sctp_ulpevent_make_assoc_change(asoc, 0, SCTP_COMM_LOST, |
497 | (__u16)error, 0, 0, chunk, | ||
498 | GFP_ATOMIC); | ||
499 | else | ||
500 | event = sctp_ulpevent_make_assoc_change(asoc, 0, SCTP_COMM_LOST, | ||
501 | (__u16)error, 0, 0, NULL, | ||
497 | GFP_ATOMIC); | 502 | GFP_ATOMIC); |
498 | if (event) | 503 | if (event) |
499 | sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, | 504 | sctp_add_cmd_sf(commands, SCTP_CMD_EVENT_ULP, |