net: sctp: Fix negotiation of the number of data streams.
authorDavid Laight <David.Laight@ACULAB.COM>
Wed, 19 Aug 2020 14:40:52 +0000 (14:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Aug 2020 23:37:37 +0000 (16:37 -0700)
commitab921f3cdbec01c68705a7ade8bec628d541fc2b
tree2a75fcdc873fe7920d049de83c7a372ab389f45e
parent41506bff84f1563e20e505ca9a0366a30ae2a879
net: sctp: Fix negotiation of the number of data streams.

The number of output and input streams was never being reduced, eg when
processing received INIT or INIT_ACK chunks.
The effect is that DATA chunks can be sent with invalid stream ids
and then discarded by the remote system.

Fixes: 2075e50caf5ea ("sctp: convert to genradix")
Signed-off-by: David Laight <david.laight@aculab.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/stream.c