aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/sctp/associola.c4
-rw-r--r--net/sctp/input.c8
-rw-r--r--net/sctp/socket.c3
3 files changed, 14 insertions, 1 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index df94e3cdfba3..498edb0cd4e5 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -1231,6 +1231,10 @@ void sctp_assoc_sync_pmtu(struct sctp_association *asoc)
1231 /* Get the lowest pmtu of all the transports. */ 1231 /* Get the lowest pmtu of all the transports. */
1232 list_for_each(pos, &asoc->peer.transport_addr_list) { 1232 list_for_each(pos, &asoc->peer.transport_addr_list) {
1233 t = list_entry(pos, struct sctp_transport, transports); 1233 t = list_entry(pos, struct sctp_transport, transports);
1234 if (t->pmtu_pending && t->dst) {
1235 sctp_transport_update_pmtu(t, dst_mtu(t->dst));
1236 t->pmtu_pending = 0;
1237 }
1234 if (!pmtu || (t->pathmtu < pmtu)) 1238 if (!pmtu || (t->pathmtu < pmtu))
1235 pmtu = t->pathmtu; 1239 pmtu = t->pathmtu;
1236 } 1240 }
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 45d6a644cf06..d57ff7f3c576 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -367,9 +367,15 @@ static void sctp_add_backlog(struct sock *sk, struct sk_buff *skb)
367void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc, 367void 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 /* Update transports view of the MTU */ 380 /* Update transports view of the MTU */
375 sctp_transport_update_pmtu(t, pmtu); 381 sctp_transport_update_pmtu(t, pmtu);
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 45510c46c223..6edaaa009d62 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1662,6 +1662,9 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
1662 goto out_free; 1662 goto out_free;
1663 } 1663 }
1664 1664
1665 if (asoc->pmtu_pending)
1666 sctp_assoc_pending_pmtu(asoc);
1667
1665 /* If fragmentation is disabled and the message length exceeds the 1668 /* If fragmentation is disabled and the message length exceeds the
1666 * association fragmentation point, return EMSGSIZE. The I-D 1669 * association fragmentation point, return EMSGSIZE. The I-D
1667 * does not specify what this error is, but this looks like 1670 * does not specify what this error is, but this looks like