diff options
Diffstat (limited to 'net/sctp/input.c')
-rw-r--r-- | net/sctp/input.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c index 885109fb3dda..d57ff7f3c576 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c | |||
@@ -367,24 +367,18 @@ static void sctp_add_backlog(struct sock *sk, struct sk_buff *skb) | |||
367 | void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc, | 367 | void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc, |
368 | struct sctp_transport *t, __u32 pmtu) | 368 | struct sctp_transport *t, __u32 pmtu) |
369 | { | 369 | { |
370 | if (sock_owned_by_user(sk) || !t || (t->pathmtu == pmtu)) | 370 | if (!t || (t->pathmtu == pmtu)) |
371 | return; | 371 | return; |
372 | 372 | ||
373 | if (sock_owned_by_user(sk)) { | ||
374 | asoc->pmtu_pending = 1; | ||
375 | t->pmtu_pending = 1; | ||
376 | return; | ||
377 | } | ||
378 | |||
373 | if (t->param_flags & SPP_PMTUD_ENABLE) { | 379 | if (t->param_flags & SPP_PMTUD_ENABLE) { |
374 | if (unlikely(pmtu < SCTP_DEFAULT_MINSEGMENT)) { | 380 | /* Update transports view of the MTU */ |
375 | printk(KERN_WARNING "%s: Reported pmtu %d too low, " | 381 | sctp_transport_update_pmtu(t, pmtu); |
376 | "using default minimum of %d\n", | ||
377 | __FUNCTION__, pmtu, | ||
378 | SCTP_DEFAULT_MINSEGMENT); | ||
379 | /* Use default minimum segment size and disable | ||
380 | * pmtu discovery on this transport. | ||
381 | */ | ||
382 | t->pathmtu = SCTP_DEFAULT_MINSEGMENT; | ||
383 | t->param_flags = (t->param_flags & ~SPP_PMTUD) | | ||
384 | SPP_PMTUD_DISABLE; | ||
385 | } else { | ||
386 | t->pathmtu = pmtu; | ||
387 | } | ||
388 | 382 | ||
389 | /* Update association pmtu. */ | 383 | /* Update association pmtu. */ |
390 | sctp_assoc_sync_pmtu(asoc); | 384 | sctp_assoc_sync_pmtu(asoc); |