sctp: Fix SCTP_MAXSEG socket option to comply to spec.
authorVlad Yasevich <vladislav.yasevich@hp.com>
Fri, 4 Sep 2009 22:21:00 +0000 (18:21 -0400)
committerVlad Yasevich <vladislav.yasevich@hp.com>
Fri, 4 Sep 2009 22:21:00 +0000 (18:21 -0400)
commitf68b2e05f326971cd76c65aa91a1a41771dd7485
tree2940d83f3787570cc030791378ee23b89b941662
parentcb95ea32a457871f72752164de8d94fa20f4703c
sctp: Fix SCTP_MAXSEG socket option to comply to spec.

We had a bug that we never stored the user-defined value for
MAXSEG when setting the value on an association.  Thus future
PMTU events ended up re-writing the frag point and increasing
it past user limit.  Additionally, when setting the option on
the socket/endpoint, we effect all current associations, which
is against spec.

Now, we store the user 'maxseg' value along with the computed
'frag_point'.  We inherit 'maxseg' from the socket at association
creation and use it as an upper limit for 'frag_point' when its
set.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
include/net/sctp/sctp.h
include/net/sctp/structs.h
net/sctp/associola.c
net/sctp/socket.c