]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/sctp/input.c
[SCTP] Flag a pmtu change request
[karo-tx-linux.git] / net / sctp / input.c
index 885109fb3dda129a551ccac0ca4e88d29236c712..d57ff7f3c5764510e32c8b1812c2c89492df9da8 100644 (file)
@@ -367,24 +367,18 @@ static void sctp_add_backlog(struct sock *sk, struct sk_buff *skb)
 void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc,
                           struct sctp_transport *t, __u32 pmtu)
 {
-       if (sock_owned_by_user(sk) || !t || (t->pathmtu == pmtu))
+       if (!t || (t->pathmtu == pmtu))
                return;
 
+       if (sock_owned_by_user(sk)) {
+               asoc->pmtu_pending = 1;
+               t->pmtu_pending = 1;
+               return;
+       }
+
        if (t->param_flags & SPP_PMTUD_ENABLE) {
-               if (unlikely(pmtu < SCTP_DEFAULT_MINSEGMENT)) {
-                       printk(KERN_WARNING "%s: Reported pmtu %d too low, "
-                              "using default minimum of %d\n",
-                              __FUNCTION__, pmtu,
-                              SCTP_DEFAULT_MINSEGMENT);
-                       /* Use default minimum segment size and disable
-                        * pmtu discovery on this transport.
-                        */
-                       t->pathmtu = SCTP_DEFAULT_MINSEGMENT;
-                       t->param_flags = (t->param_flags & ~SPP_PMTUD) |
-                               SPP_PMTUD_DISABLE;
-               } else {
-                       t->pathmtu = pmtu;
-               }
+               /* Update transports view of the MTU */
+               sctp_transport_update_pmtu(t, pmtu);
 
                /* Update association pmtu. */
                sctp_assoc_sync_pmtu(asoc);