|
@@ -3211,7 +3211,6 @@ static int sctp_setsockopt_mappedv4(struct sock *sk, char __user *optval, unsign
|
|
|
static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, unsigned int optlen)
|
|
|
{
|
|
|
struct sctp_sock *sp = sctp_sk(sk);
|
|
|
- struct sctp_af *af = sp->pf->af;
|
|
|
struct sctp_assoc_value params;
|
|
|
struct sctp_association *asoc;
|
|
|
int val;
|
|
@@ -3249,12 +3248,6 @@ static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, unsigned
|
|
|
}
|
|
|
|
|
|
if (asoc) {
|
|
|
- if (val == 0) {
|
|
|
- val = asoc->pathmtu - af->net_header_len;
|
|
|
- val -= af->ip_options_len(sk);
|
|
|
- val -= sizeof(struct sctphdr) +
|
|
|
- sctp_datachk_len(&asoc->stream);
|
|
|
- }
|
|
|
asoc->user_frag = val;
|
|
|
sctp_assoc_update_frag_point(asoc);
|
|
|
} else {
|