Commit ac40e41f authored by Vlad Yasevich's avatar Vlad Yasevich Committed by David S. Miller

[SCTP]: Do not include ABORT chunk header in the notification.

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: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 70b57b81
...@@ -141,11 +141,6 @@ struct sctp_ulpevent *sctp_ulpevent_make_assoc_change( ...@@ -141,11 +141,6 @@ struct sctp_ulpevent *sctp_ulpevent_make_assoc_change(
* an ABORT, so we need to include it in the sac_info. * an ABORT, so we need to include it in the sac_info.
*/ */
if (chunk) { 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 /* Copy the chunk data to a new skb and reserve enough
* head room to use as notification. * head room to use as notification.
*/ */
...@@ -155,9 +150,6 @@ struct sctp_ulpevent *sctp_ulpevent_make_assoc_change( ...@@ -155,9 +150,6 @@ struct sctp_ulpevent *sctp_ulpevent_make_assoc_change(
if (!skb) if (!skb)
goto fail; 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. */ /* Embed the event fields inside the cloned skb. */
event = sctp_skb2event(skb); event = sctp_skb2event(skb);
sctp_ulpevent_init(event, MSG_NOTIFICATION, skb->truesize); sctp_ulpevent_init(event, MSG_NOTIFICATION, skb->truesize);
...@@ -168,7 +160,8 @@ struct sctp_ulpevent *sctp_ulpevent_make_assoc_change( ...@@ -168,7 +160,8 @@ struct sctp_ulpevent *sctp_ulpevent_make_assoc_change(
/* Trim the buffer to the right length. */ /* Trim the buffer to the right length. */
skb_trim(skb, sizeof(struct sctp_assoc_change) + skb_trim(skb, sizeof(struct sctp_assoc_change) +
ntohs(chunk->chunk_hdr->length)); ntohs(chunk->chunk_hdr->length) -
sizeof(sctp_chunkhdr_t));
} else { } else {
event = sctp_ulpevent_new(sizeof(struct sctp_assoc_change), event = sctp_ulpevent_new(sizeof(struct sctp_assoc_change),
MSG_NOTIFICATION, gfp); MSG_NOTIFICATION, gfp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment