Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10742
b: refs/heads/master
c: 96a3399
h: refs/heads/master
v: v3
  • Loading branch information
Ivan Skytte Jorgensen authored and Sridhar Samudrala committed Oct 28, 2005
1 parent 29c1ebd commit 31aa6d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a1ab3582699def352dab1355adcadd3d47f79f0f
refs/heads/master: 96a339985d4c6874d32909e8f1903e6e6c141399
12 changes: 5 additions & 7 deletions trunk/net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 31aa6d7

Please sign in to comment.