diff options
author | Colin Cross <ccross@android.com> | 2012-05-14 16:41:02 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2012-05-14 16:41:02 -0700 |
commit | ec0b571c19ac62ab0bb80d373a3d4922a48b4b75 (patch) | |
tree | 10c597f5227c969c3f2b909fbeb29725a0c5c6e8 /net/sctp | |
parent | 7bb8b65407a519d3a90dd8cecdd1ccd10ee0c6cc (diff) | |
parent | 36be50515fe2aef61533b516fa2576a2c7fe7664 (diff) |
Merge commit 'v3.4-rc7' into android-3.4
Diffstat (limited to 'net/sctp')
-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 817174eb5f4..8fc4dcd294a 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c @@ -377,9 +377,7 @@ int sctp_packet_transmit(struct sctp_packet *packet) */ skb_set_owner_w(nskb, sk); - /* The 'obsolete' field of dst is set to 2 when a dst is freed. */ - if (!dst || (dst->obsolete > 1)) { - dst_release(dst); + if (!sctp_transport_dst_check(tp)) { sctp_transport_route(tp, NULL, sctp_sk(sk)); if (asoc && (asoc->param_flags & SPP_PMTUD_ENABLE)) { sctp_assoc_sync_pmtu(asoc); diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 3889330b7b0..b026ba0c699 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) transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT; } -/* this is a complete rip-off from __sk_dst_check - * the cookie is always 0 since this is how it's used in the - * pmtu code - */ -static struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t) -{ - struct dst_entry *dst = t->dst; - - if (dst && dst->obsolete && dst->ops->check(dst, 0) == NULL) { - dst_release(t->dst); - t->dst = NULL; - return NULL; - } - - return dst; -} - void sctp_transport_update_pmtu(struct sctp_transport *t, u32 pmtu) { struct dst_entry *dst; |