sctp: consider idata chunks when setting SCTP_MAXSEG
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Thu, 26 Apr 2018 19:59:01 +0000 (16:59 -0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Apr 2018 18:35:23 +0000 (14:35 -0400)
commit439ef0309cf4b743d76edc2abeca72b27ee1d996
tree28249b9f025a593815d0e5da16ac29288fe41465
parent63d01330aad9531a491db1bed5f15cc6b7fd1a78
sctp: consider idata chunks when setting SCTP_MAXSEG

When setting SCTP_MAXSEG sock option, it should consider which kind of
data chunk is being used if the asoc is already available, so that the
limit better reflect reality.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sctp/socket.c