sctp: allow unsetting sockopt MAXSEG
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Thu, 26 Apr 2018 19:59:02 +0000 (16:59 -0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Apr 2018 18:35:24 +0000 (14:35 -0400)
commit38687b56c51b535024d46d6b5375163a6a40a196
tree56ef91a153676cf598653f135975fabb58694018
parent439ef0309cf4b743d76edc2abeca72b27ee1d996
sctp: allow unsetting sockopt MAXSEG

RFC 6458 Section 8.1.16 says that setting MAXSEG as 0 means that the user
is not limiting it, and not that it should set to the *current* maximum,
as we are doing.

This patch thus allow setting it as 0, effectively removing the user
limit.

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