diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-16 06:57:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-16 06:57:14 -0400 |
commit | 02f3d4ce9e81434a365f4643020b0402f6fe3332 (patch) | |
tree | 8fd12d62c3d92ed090d1d7e5f92750bef951b914 /net/sctp/transport.c | |
parent | 35ad9b9cf7d8a2e6259a0d24022e910adb6f3489 (diff) |
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.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 1dcceb6e0ce..e69e1a2175a 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) | |||
228 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; | 228 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; |
229 | } | 229 | } |
230 | 230 | ||
231 | void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu) | 231 | void sctp_transport_update_pmtu(struct sock *sk, struct sctp_transport *t, u32 pmtu) |
232 | { | 232 | { |
233 | struct dst_entry *dst; | 233 | struct dst_entry *dst; |
234 | 234 | ||
@@ -245,8 +245,16 @@ void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu) | |||
245 | } | 245 | } |
246 | 246 | ||
247 | dst = sctp_transport_dst_check(t); | 247 | dst = sctp_transport_dst_check(t); |
248 | if (dst) | 248 | if (!dst) |
249 | t->af_specific->get_dst(t, &t->saddr, &t->fl, sk); | ||
250 | |||
251 | if (dst) { | ||
249 | dst->ops->update_pmtu(dst, pmtu); | 252 | dst->ops->update_pmtu(dst, pmtu); |
253 | |||
254 | dst = sctp_transport_dst_check(t); | ||
255 | if (!dst) | ||
256 | t->af_specific->get_dst(t, &t->saddr, &t->fl, sk); | ||
257 | } | ||
250 | } | 258 | } |
251 | 259 | ||
252 | /* Caches the dst entry and source address for a transport's destination | 260 | /* Caches the dst entry and source address for a transport's destination |