sctp: several fixes and improvements
Approved by: re (gjb)
sctp: improve consistency
No functional change intended.
(cherry picked from commit 7a051c0a7890dc8e490ebe125bfc70a28e89ddaf)
(cherry picked from commit 459f1b906515076b7ce30a06ab69a60891d8cbe8)
sctp: fix PR-SCTP stats when adding addtional streams
(cherry picked from commit 0f7573ffd6141b19419c9a6238246b9ba0e6dce6)
(cherry picked from commit 21398f02b0c7913f815ae6ded426da60d92c635b)
sctp: fix a locking issue for old unordered data
Thanks to Anatoly Korniltsev for reporting the issue for the
userland stack.
(cherry picked from commit 8dc6a1edca6de0c64f6c082f69097746d1346592)
(cherry picked from commit 3fa95c0fe60bbd67db6043c7e18910387bbe1bac)
sctp: improve input validation
Improve the handling of INIT chunks in specific szenarios and
report and appropriate error cause.
Thanks to Anatoly Korniltsev for reporting the issue for the
userland stack.
(cherry picked from commit af885c57d65d33c0306e91d3e090e76772a0d012)
(cherry picked from commit 16b538975024e2b7038807bf5b712124f5a7b889)
sctp: small cleanup, no functional change intended.
(cherry picked from commit bdd4630c9a9cea64830f981fc897ac953c48892c)
(cherry picked from commit 5573b94fa67f954dd0db57de328e60941ee8c9d1)
sctp: clear a pointer to a net which will be removed
(cherry picked from commit 5ac839029d01c0f48e1b1ff1a599cb47cf5e98ee)
(cherry picked from commit 04c13928d9f306a7d7ac34452644a538d2be6fdc)
sctp: improve computation of an alternate net
Espeially handle the case where the net passed in is about to
be deleted and therefore not in the list of nets anymore.
Reported by: syzbot+9756917a7c8381adf5e8@syzkaller.appspotmail.com
(cherry picked from commit b963ce4588b33f733aef3f7a7f3fbe5018a89728)
(cherry picked from commit 8cf046aff9719779b665f7f4f4a8bad4b3945341)
sctp: avoid integer overflow when starting the HB timer
Reported by: syzbot+14b9d7c3c64208fae62f@syzkaller.appspotmail.com
(cherry picked from commit 70e95f0b6917a8b8cd4a2a5f883f3e9753fc86d8)
(cherry picked from commit f7c20120c19b6307536908a7f779be2832b133f3)