SCTP: DATA chunk padding fix and hardening 45/15145/9
authorMarco Varlese <marco.varlese@suse.com>
Thu, 4 Oct 2018 13:46:05 +0000 (15:46 +0200)
committerFlorin Coras <florin.coras@gmail.com>
Thu, 25 Oct 2018 01:05:09 +0000 (01:05 +0000)
commit8797168fe2f4fd32d241126181ad0d06c62c4eb4
tree6fdc5face12961fed6c521cc34dff7627ec446ac
parent5f1fd46573aa111018f838db14de53e8ecf854b3
SCTP: DATA chunk padding fix and hardening

According to the RFC 4096 (section 3.3.1) the DATA chunk needs to be
padded to a boundary of 4 bytes with zeros. This patch addresses that
requirement.
At the same time, this patch takes care of adding some hardening for
corner-cases where the transmitted tag could be wrong.

Change-Id: I3b653926e9933d0d3d46bc5f37eaceefd932e874
Signed-off-by: Marco Varlese <marco.varlese@suse.com>
src/vnet/sctp/sctp.c
src/vnet/sctp/sctp_input.c
src/vnet/sctp/sctp_output.c
test/test_sctp.py