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>
This commit is contained in:
parent
475cba4ec8
commit
6dc7694f9d
@ -2868,6 +2868,7 @@ sctp_disposition_t sctp_sf_eat_data_6_2(const struct sctp_endpoint *ep,
|
|||||||
sctp_cmd_seq_t *commands)
|
sctp_cmd_seq_t *commands)
|
||||||
{
|
{
|
||||||
struct sctp_chunk *chunk = arg;
|
struct sctp_chunk *chunk = arg;
|
||||||
|
sctp_arg_t force = SCTP_NOFORCE();
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
if (!sctp_vtag_verify(chunk, asoc)) {
|
if (!sctp_vtag_verify(chunk, asoc)) {
|
||||||
@ -2901,6 +2902,9 @@ sctp_disposition_t sctp_sf_eat_data_6_2(const struct sctp_endpoint *ep,
|
|||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (chunk->chunk_hdr->flags & SCTP_DATA_SACK_IMM)
|
||||||
|
force = SCTP_FORCE();
|
||||||
|
|
||||||
if (asoc->autoclose) {
|
if (asoc->autoclose) {
|
||||||
sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_RESTART,
|
sctp_add_cmd_sf(commands, SCTP_CMD_TIMER_RESTART,
|
||||||
SCTP_TO(SCTP_EVENT_TIMEOUT_AUTOCLOSE));
|
SCTP_TO(SCTP_EVENT_TIMEOUT_AUTOCLOSE));
|
||||||
@ -2929,7 +2933,7 @@ sctp_disposition_t sctp_sf_eat_data_6_2(const struct sctp_endpoint *ep,
|
|||||||
* more aggressive than the following algorithms allow.
|
* more aggressive than the following algorithms allow.
|
||||||
*/
|
*/
|
||||||
if (chunk->end_of_packet)
|
if (chunk->end_of_packet)
|
||||||
sctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, SCTP_NOFORCE());
|
sctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, force);
|
||||||
|
|
||||||
return SCTP_DISPOSITION_CONSUME;
|
return SCTP_DISPOSITION_CONSUME;
|
||||||
|
|
||||||
@ -2954,7 +2958,7 @@ discard_force:
|
|||||||
|
|
||||||
discard_noforce:
|
discard_noforce:
|
||||||
if (chunk->end_of_packet)
|
if (chunk->end_of_packet)
|
||||||
sctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, SCTP_NOFORCE());
|
sctp_add_cmd_sf(commands, SCTP_CMD_GEN_SACK, force);
|
||||||
|
|
||||||
return SCTP_DISPOSITION_DISCARD;
|
return SCTP_DISPOSITION_DISCARD;
|
||||||
consume:
|
consume:
|
||||||
|
Loading…
Reference in New Issue
Block a user