diff options
author | Wei Yongjun <yjwei@cn.fujitsu.com> | 2009-11-23 15:53:53 -0500 |
---|---|---|
committer | Vlad Yasevich <vladislav.yasevich@hp.com> | 2009-11-23 15:53:53 -0500 |
commit | 6dc7694f9df20f148076d82d00cb3663afb0b000 (patch) | |
tree | c5c3c20ad80383bb28cf02e25cc6c0a60099e266 /net/sctp | |
parent | 475cba4ec8ee6b427cc3567692e6f48dd483c069 (diff) |
sctp: implement the receiver side for SACK-IMMEDIATELY extension
This patch implement the receiver side for SACK-IMMEDIATELY
extension:
Section 4.2. Receiver Side Considerations
On reception of an SCTP packet containing a DATA chunk with the I-bit
set, the receiver SHOULD NOT delay the sending of the corresponding
SACK chunk and SHOULD send it back immediately.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/sm_statefuns.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index d4df45022ffa..8ee24c9dc7e9 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -2868,6 +2868,7 @@ sctp_disposition_t sctp_sf_eat_data_6_2(const struct sctp_endpoint *ep, | |||
2868 | sctp_cmd_seq_t *commands) | 2868 | sctp_cmd_seq_t *commands) |
2869 | { | 2869 | { |
2870 | struct sctp_chunk *chunk = arg; | 2870 | struct sctp_chunk *chunk = arg; |
2871 | sctp_arg_t force = SCTP_NOFORCE(); | ||
2871 | int error; | 2872 | int error; |
2872 | 2873 | ||
2873 | if (!sctp_vtag_verify(chunk, asoc)) { | 2874 | if (!sctp_vtag_verify(chunk, asoc)) { |
@@ -2901,6 +2902,9 @@ sctp_disposition_t sctp_sf_eat_data_6_2(const struct sctp_endpoint *ep, | |||
2901 | BUG(); | 2902 | BUG(); |
2902 | } | 2903 | } |
2903 | 2904 | ||
2905 | if (chunk->chunk_hdr->flags & SCTP_DATA_SACK_IMM) | ||
2906 | force = SCTP_FORCE(); | ||
2907 | |||
2904 | if (asoc->autoclose) { | 2908 | if (asoc->autoclose) { |
2905 | sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_RESTART, | 2909 | sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_RESTART, |
2906 | SCTP_TO(SCTP_EVENT_TIMEOUT_AUTOCLOSE)); | 2910 | SCTP_TO(SCTP_EVENT_TIMEOUT_AUTOCLOSE)); |
@@ -2929,7 +2933,7 @@ sctp_disposition_t sctp_sf_eat_data_6_2(const struct sctp_endpoint *ep, | |||
2929 | * more aggressive than the following algorithms allow. | 2933 | * more aggressive than the following algorithms allow. |
2930 | */ | 2934 | */ |
2931 | if (chunk->end_of_packet) | 2935 | if (chunk->end_of_packet) |
2932 | sctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, SCTP_NOFORCE()); | 2936 | sctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, force); |
2933 | 2937 | ||
2934 | return SCTP_DISPOSITION_CONSUME; | 2938 | return SCTP_DISPOSITION_CONSUME; |
2935 | 2939 | ||
@@ -2954,7 +2958,7 @@ discard_force: | |||
2954 | 2958 | ||
2955 | discard_noforce: | 2959 | discard_noforce: |
2956 | if (chunk->end_of_packet) | 2960 | if (chunk->end_of_packet) |
2957 | sctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, SCTP_NOFORCE()); | 2961 | sctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, force); |
2958 | 2962 | ||
2959 | return SCTP_DISPOSITION_DISCARD; | 2963 | return SCTP_DISPOSITION_DISCARD; |
2960 | consume: | 2964 | consume: |