Linux 3.2.102
[pandora-kernel.git] / net / sctp / transport.c
index 394c57c..9e3d368 100644 (file)
@@ -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;
@@ -291,8 +274,8 @@ void sctp_transport_route(struct sctp_transport *transport,
                 */
                if (asoc && (!asoc->peer.primary_path ||
                                (transport == asoc->peer.active_path)))
-                       opt->pf->af->to_sk_saddr(&transport->saddr,
-                                                asoc->base.sk);
+                       opt->pf->to_sk_saddr(&transport->saddr,
+                                            asoc->base.sk);
        } else
                transport->pathmtu = SCTP_DEFAULT_MAXSEGMENT;
 }