summaryrefslogtreecommitdiffstats
path: root/net/sctp/transport.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-16 03:57:14 -0700
committerDavid S. Miller <davem@davemloft.net>2012-07-16 03:57:14 -0700
commit02f3d4ce9e81434a365f4643020b0402f6fe3332 (patch)
tree8fd12d62c3d92ed090d1d7e5f92750bef951b914 /net/sctp/transport.c
parent35ad9b9cf7d8a2e6259a0d24022e910adb6f3489 (diff)
downloadlinux-02f3d4ce9e81434a365f4643020b0402f6fe3332.tar.bz2
sctp: Adjust PMTU updates to accomodate route invalidation.
This adjusts the call to dst_ops->update_pmtu() so that we can transparently handle the fact that, in the future, the dst itself can be invalidated by the PMTU update (when we have non-host routes cached in sockets). Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/transport.c')
-rw-r--r--net/sctp/transport.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index 1dcceb6e0ce6..e69e1a2175a4 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -228,7 +228,7 @@ void sctp_transport_pmtu(struct sctp_transport *transport, struct sock *sk)
transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT;
}
-void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu)
+void sctp_transport_update_pmtu(struct sock *sk, struct sctp_transport *t, u32 pmtu)
{
struct dst_entry *dst;
@@ -245,8 +245,16 @@ void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu)
}
dst = sctp_transport_dst_check(t);
- if (dst)
+ if (!dst)
+ t->af_specific->get_dst(t, &t->saddr, &t->fl, sk);
+
+ if (dst) {
dst->ops->update_pmtu(dst, pmtu);
+
+ dst = sctp_transport_dst_check(t);
+ if (!dst)
+ t->af_specific->get_dst(t, &t->saddr, &t->fl, sk);
+ }
}
/* Caches the dst entry and source address for a transport's destination