diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/sctp/output.c | 4 | ||||
-rw-r--r-- | net/sctp/transport.c | 17 |
2 files changed, 1 insertions, 20 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c index 817174eb5f41..8fc4dcd294ab 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -377,9 +377,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
377 | */ | 377 | */ |
378 | skb_set_owner_w(nskb, sk); | 378 | skb_set_owner_w(nskb, sk); |
379 | 379 | ||
380 | /* The 'obsolete' field of dst is set to 2 when a dst is freed. */ | 380 | if (!sctp_transport_dst_check(tp)) { |
381 | if (!dst || (dst->obsolete > 1)) { | ||
382 | dst_release(dst); | ||
383 | sctp_transport_route(tp, NULL, sctp_sk(sk)); | 381 | sctp_transport_route(tp, NULL, sctp_sk(sk)); |
384 | if (asoc && (asoc->param_flags & SPP_PMTUD_ENABLE)) { | 382 | if (asoc && (asoc->param_flags & SPP_PMTUD_ENABLE)) { |
385 | sctp_assoc_sync_pmtu(asoc); | 383 | sctp_assoc_sync_pmtu(asoc); |
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 3889330b7b04..b026ba0c6992 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -226,23 +226,6 @@ void sctp_transport_pmtu(struct sctp_transport *transport, struct sock *sk) | |||
226 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; | 226 | transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; |
227 | } | 227 | } |
228 | 228 | ||
229 | /* this is a complete rip-off from __sk_dst_check | ||
230 | * the cookie is always 0 since this is how it's used in the | ||
231 | * pmtu code | ||
232 | */ | ||
233 | static struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t) | ||
234 | { | ||
235 | struct dst_entry *dst = t->dst; | ||
236 | |||
237 | if (dst && dst->obsolete && dst->ops->check(dst, 0) == NULL) { | ||
238 | dst_release(t->dst); | ||
239 | t->dst = NULL; | ||
240 | return NULL; | ||
241 | } | ||
242 | |||
243 | return dst; | ||
244 | } | ||
245 | |||
246 | void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu) | 229 | void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu) |
247 | { | 230 | { |
248 | struct dst_entry *dst; | 231 | struct dst_entry *dst; |