]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: Fix data segmentation with small frag_size
authorVlad Yasevich <vladislav.yasevich@hp.com>
Fri, 4 Sep 2009 22:20:56 +0000 (18:20 -0400)
committerVlad Yasevich <vladislav.yasevich@hp.com>
Fri, 4 Sep 2009 22:20:56 +0000 (18:20 -0400)
commit6e79f45a5e7e504224716c6da1b42434bf5a7710
treee8e175b95bdf137565a301e382d6f7c22e4a417e
parent2c77b8492a53d255e6b119e452db30da830e7880
sctp: Fix data segmentation with small frag_size

Since an application may specify the maximum SCTP fragment size
that all data should be fragmented to, we need to fix how
we do segmentation.   Right now, if a user specifies a small
fragment size, the segment size can go negative in the presence
of AUTH or COOKIE_ECHO bundling.

What we need to do is track the largest possbile DATA chunk that
can fit into the mtu.  Then if the fragment size specified is
bigger then this maximum length, we'll shrink it down.  Otherwise,
we just use the smaller segment size without changing it further.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
net/sctp/chunk.c