Skip to content

Commit

Permalink
[SCTP]: Do not include ABORT chunk header in the notification.
Browse files Browse the repository at this point in the history
The socket API draft is unclear about whether to include the
chunk header or not.  Recent discussion on the sctp implementors
mailing list clarified that the chunk header shouldn't be included,
but the error parameter header still needs to be there.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vlad Yasevich authored and David S. Miller committed May 11, 2007
1 parent 70b57b8 commit ac40e41
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions net/sctp/ulpevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,6 @@ struct sctp_ulpevent *sctp_ulpevent_make_assoc_change(
* an ABORT, so we need to include it in the sac_info.
*/
if (chunk) {
/* sctp_inqu_pop() has allready pulled off the chunk
* header. We need to put it back temporarily
*/
skb_push(chunk->skb, sizeof(sctp_chunkhdr_t));

/* Copy the chunk data to a new skb and reserve enough
* head room to use as notification.
*/
Expand All @@ -155,9 +150,6 @@ struct sctp_ulpevent *sctp_ulpevent_make_assoc_change(
if (!skb)
goto fail;

/* put back the chunk header now that we have a copy */
skb_pull(chunk->skb, sizeof(sctp_chunkhdr_t));

/* Embed the event fields inside the cloned skb. */
event = sctp_skb2event(skb);
sctp_ulpevent_init(event, MSG_NOTIFICATION, skb->truesize);
Expand All @@ -168,7 +160,8 @@ struct sctp_ulpevent *sctp_ulpevent_make_assoc_change(

/* Trim the buffer to the right length. */
skb_trim(skb, sizeof(struct sctp_assoc_change) +
ntohs(chunk->chunk_hdr->length));
ntohs(chunk->chunk_hdr->length) -
sizeof(sctp_chunkhdr_t));
} else {
event = sctp_ulpevent_new(sizeof(struct sctp_assoc_change),
MSG_NOTIFICATION, gfp);
Expand Down

0 comments on commit ac40e41

Please sign in to comment.