]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'sctp-fix-gap-ack-blocks'
authorDavid S. Miller <davem@davemloft.net>
Fri, 23 Sep 2016 10:55:04 +0000 (06:55 -0400)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Sep 2016 10:55:04 +0000 (06:55 -0400)
commit7eca449b5417b2cbaac30ef1a0e387994bbf009c
treeee337cdd7533abaf1e538a188184307c1de021f0
parent255d6175d26a66c89e9d7d5f64aa362ec6592b52
parent9c043ca098a82d67e7742cf577b13f546d1f2a3f
Merge branch 'sctp-fix-gap-ack-blocks'

Marcelo Ricardo Leitner says:

====================
sctp: fix the handling of SACK Gap Ack blocks

sctp_acked() is using 32bit arithmetics on 16bits vars, via TSN_lte()
macros, which is weird and confusing.

Once the offset to ctsn is calculated, all wrapping is already handled
and thus to verify the Gap Ack blocks we can just use pure
less/big-or-equal than checks.

Also, rename gap variable to tsn_offset, so it's more meaningful, as
it doesn't point to any gap at all.

Even so, I don't think this discrepancy resulted in any practical bug.

This patch is a preparation for the next one, which will introduce
typecheck() for TSN_lte() macros and would cause a compile error here.

Suggested-by: David Laight <David.Laight@ACULAB.COM>
Reported-by: David Laight <David.Laight@ACULAB.COM>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
====================

Signed-off-by: David S. Miller <davem@davemloft.net>