From 31aa6d7d4ccc17b7caa450c87b22ef6507dd0e15 Mon Sep 17 00:00:00 2001 From: Ivan Skytte Jorgensen Date: Fri, 28 Oct 2005 15:36:12 -0700 Subject: [PATCH] --- yaml --- r: 10742 b: refs/heads/master c: 96a339985d4c6874d32909e8f1903e6e6c141399 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/sctp/socket.c | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 8a7c7c607002..92e222ced146 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a1ab3582699def352dab1355adcadd3d47f79f0f +refs/heads/master: 96a339985d4c6874d32909e8f1903e6e6c141399 diff --git a/trunk/net/sctp/socket.c b/trunk/net/sctp/socket.c index c66c161908c0..97b556c1c450 100644 --- a/trunk/net/sctp/socket.c +++ b/trunk/net/sctp/socket.c @@ -2306,16 +2306,14 @@ static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, int optl return -EINVAL; if (get_user(val, (int __user *)optval)) return -EFAULT; - if ((val < 8) || (val > SCTP_MAX_CHUNK_LEN)) + if ((val != 0) && ((val < 8) || (val > SCTP_MAX_CHUNK_LEN))) return -EINVAL; sp->user_frag = val; - if (val) { - /* Update the frag_point of the existing associations. */ - list_for_each(pos, &(sp->ep->asocs)) { - asoc = list_entry(pos, struct sctp_association, asocs); - asoc->frag_point = sctp_frag_point(sp, asoc->pmtu); - } + /* Update the frag_point of the existing associations. */ + list_for_each(pos, &(sp->ep->asocs)) { + asoc = list_entry(pos, struct sctp_association, asocs); + asoc->frag_point = sctp_frag_point(sp, asoc->pmtu); } return 0;