Re: [PATCH net] sctp: set frag_point in sctp_setsockopt_maxseg correctly

2017-11-17 Thread David Miller
From: Xin Long Date: Fri, 17 Nov 2017 14:11:11 +0800 > Now in sctp_setsockopt_maxseg user_frag or frag_point can be set with > val >= 8 and val <= SCTP_MAX_CHUNK_LEN. But both checks are incorrect. > > val >= 8 means frag_point can even be less than SCTP_DEFAULT_MINSEGMENT. > Then in sctp_datams

Re: [PATCH net] sctp: set frag_point in sctp_setsockopt_maxseg correctly

2017-11-17 Thread Marcelo Ricardo Leitner
On Fri, Nov 17, 2017 at 02:11:11PM +0800, Xin Long wrote: > Now in sctp_setsockopt_maxseg user_frag or frag_point can be set with > val >= 8 and val <= SCTP_MAX_CHUNK_LEN. But both checks are incorrect. > > val >= 8 means frag_point can even be less than SCTP_DEFAULT_MINSEGMENT. > Then in sctp_dat

[PATCH net] sctp: set frag_point in sctp_setsockopt_maxseg correctly

2017-11-16 Thread Xin Long
Now in sctp_setsockopt_maxseg user_frag or frag_point can be set with val >= 8 and val <= SCTP_MAX_CHUNK_LEN. But both checks are incorrect. val >= 8 means frag_point can even be less than SCTP_DEFAULT_MINSEGMENT. Then in sctp_datamsg_from_user(), when it's value is greater than cookie echo len an