diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-05-20 16:27:44 -0400 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-05-20 16:27:44 -0400 |
commit | ad34ea2cc3845ef4dcd7d12fb0fa8484734bd672 (patch) | |
tree | ad434400f5ecaa33b433c8f830e40792d8d6c05c /net/sctp/sm_make_chunk.c | |
parent | 90356ac3194bf91a441a5f9c3067af386ef62462 (diff) | |
parent | 88d7bd8cb9eb8d64bf7997600b0d64f7834047c5 (diff) |
merge by hand - fix up rejections in Documentation/DocBook/Makefile
Diffstat (limited to 'net/sctp/sm_make_chunk.c')
-rw-r--r-- | net/sctp/sm_make_chunk.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 1db12cc18cf7..33ac8bf47b0e 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -710,7 +710,9 @@ struct sctp_chunk *sctp_make_shutdown_complete( | |||
710 | struct sctp_chunk *retval; | 710 | struct sctp_chunk *retval; |
711 | __u8 flags = 0; | 711 | __u8 flags = 0; |
712 | 712 | ||
713 | /* Maybe set the T-bit if we have no association. */ | 713 | /* Set the T-bit if we have no association (vtag will be |
714 | * reflected) | ||
715 | */ | ||
714 | flags |= asoc ? 0 : SCTP_CHUNK_FLAG_T; | 716 | flags |= asoc ? 0 : SCTP_CHUNK_FLAG_T; |
715 | 717 | ||
716 | retval = sctp_make_chunk(asoc, SCTP_CID_SHUTDOWN_COMPLETE, flags, 0); | 718 | retval = sctp_make_chunk(asoc, SCTP_CID_SHUTDOWN_COMPLETE, flags, 0); |
@@ -732,7 +734,7 @@ struct sctp_chunk *sctp_make_shutdown_complete( | |||
732 | } | 734 | } |
733 | 735 | ||
734 | /* Create an ABORT. Note that we set the T bit if we have no | 736 | /* Create an ABORT. Note that we set the T bit if we have no |
735 | * association. | 737 | * association, except when responding to an INIT (sctpimpguide 2.41). |
736 | */ | 738 | */ |
737 | struct sctp_chunk *sctp_make_abort(const struct sctp_association *asoc, | 739 | struct sctp_chunk *sctp_make_abort(const struct sctp_association *asoc, |
738 | const struct sctp_chunk *chunk, | 740 | const struct sctp_chunk *chunk, |
@@ -741,8 +743,16 @@ struct sctp_chunk *sctp_make_abort(const struct sctp_association *asoc, | |||
741 | struct sctp_chunk *retval; | 743 | struct sctp_chunk *retval; |
742 | __u8 flags = 0; | 744 | __u8 flags = 0; |
743 | 745 | ||
744 | /* Maybe set the T-bit if we have no association. */ | 746 | /* Set the T-bit if we have no association and 'chunk' is not |
745 | flags |= asoc ? 0 : SCTP_CHUNK_FLAG_T; | 747 | * an INIT (vtag will be reflected). |
748 | */ | ||
749 | if (!asoc) { | ||
750 | if (chunk && chunk->chunk_hdr && | ||
751 | chunk->chunk_hdr->type == SCTP_CID_INIT) | ||
752 | flags = 0; | ||
753 | else | ||
754 | flags = SCTP_CHUNK_FLAG_T; | ||
755 | } | ||
746 | 756 | ||
747 | retval = sctp_make_chunk(asoc, SCTP_CID_ABORT, flags, hint); | 757 | retval = sctp_make_chunk(asoc, SCTP_CID_ABORT, flags, hint); |
748 | 758 | ||
@@ -2744,7 +2754,6 @@ struct sctp_chunk *sctp_make_fwdtsn(const struct sctp_association *asoc, | |||
2744 | 2754 | ||
2745 | hint = (nstreams + 1) * sizeof(__u32); | 2755 | hint = (nstreams + 1) * sizeof(__u32); |
2746 | 2756 | ||
2747 | /* Maybe set the T-bit if we have no association. */ | ||
2748 | retval = sctp_make_chunk(asoc, SCTP_CID_FWD_TSN, 0, hint); | 2757 | retval = sctp_make_chunk(asoc, SCTP_CID_FWD_TSN, 0, hint); |
2749 | 2758 | ||
2750 | if (!retval) | 2759 | if (!retval) |