linux/include/net/sctp
Xin Long 0fc2ea922c sctp: implement validate_ftsn for sctp_stream_interleave
validate_ftsn is added as a member of sctp_stream_interleave, used to
validate ssn/chunk type for fwdtsn or mid (message id)/chunk type for
ifwdtsn, called in sctp_sf_eat_fwd_tsn, just as validate_data.

If this check fails, an abort packet will be sent, as said in section
2.3.1 of RFC8260.

As ifwdtsn and fwdtsn chunks have different length, it also defines
ftsn_chunk_len for sctp_stream_interleave to describe the chunk size.
Then it replaces all sizeof(struct sctp_fwdtsn_chunk) with
sctp_ftsnchk_len.

It also adds the process for ifwdtsn in rx path. As Marcelo pointed
out, there's no need to add event table for ifwdtsn, but just share
prsctp_chunk_event_table with fwdtsn's. It would drop fwdtsn chunk
for ifwdtsn and drop ifwdtsn chunk for fwdtsn by calling validate_ftsn
in sctp_sf_eat_fwd_tsn.

After this patch, the ifwdtsn can be accepted.

Note that this patch also removes the sctp.intl_enable check for
idata chunks in sctp_chunk_event_lookup, as it will do this check
in validate_data later.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo R. Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-12-15 13:52:22 -05:00
..
auth.h net, sctp: convert sctp_auth_bytes.refcnt from atomic_t to refcount_t 2017-07-04 22:35:18 +01:00
checksum.h sctp: force the params with right types for sctp csum apis 2017-11-28 11:00:13 -05:00
command.h sctp: remove the typedef sctp_verb_t 2017-08-11 10:02:44 -07:00
constants.h sctp: implement assign_number for sctp_stream_interleave 2017-12-11 11:23:04 -05:00
sctp.h sctp: implement assign_number for sctp_stream_interleave 2017-12-11 11:23:04 -05:00
sm.h sctp: add basic structures and make chunk function for ifwdtsn 2017-12-15 13:52:21 -05:00
stream_interleave.h sctp: implement validate_ftsn for sctp_stream_interleave 2017-12-15 13:52:22 -05:00
stream_sched.h sctp: remove extern from stream sched 2017-11-28 11:00:13 -05:00
structs.h sctp: implement validate_ftsn for sctp_stream_interleave 2017-12-15 13:52:22 -05:00
tsnmap.h sctp: Fix FSF address in file headers 2013-12-06 12:37:56 -05:00
ulpevent.h sctp: implement abort_pd for sctp_stream_interleave 2017-12-11 11:23:05 -05:00
ulpqueue.h sctp: add support for the process of unordered idata 2017-12-11 11:23:05 -05:00