]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - net/sctp/transport.c
sctp: add dst_pending_confirm flag
[mirror_ubuntu-zesty-kernel.git] / net / sctp / transport.c
index a1652ab63918940be605eaf002b5506f5e4e6673..cd52f161ebd1a9ef5d11355e571038cf9eb8eb48 100644 (file)
@@ -227,7 +227,7 @@ void sctp_transport_pmtu(struct sctp_transport *transport, struct sock *sk)
 {
        /* If we don't have a fresh route, look one up */
        if (!transport->dst || transport->dst->obsolete) {
-               dst_release(transport->dst);
+               sctp_transport_dst_release(transport);
                transport->af_specific->get_dst(transport, &transport->saddr,
                                                &transport->fl, sk);
        }
@@ -659,3 +659,17 @@ void sctp_transport_immediate_rtx(struct sctp_transport *t)
                        sctp_transport_hold(t);
        }
 }
+
+/* Drop dst */
+void sctp_transport_dst_release(struct sctp_transport *t)
+{
+       dst_release(t->dst);
+       t->dst = NULL;
+       t->dst_pending_confirm = 0;
+}
+
+/* Schedule neighbour confirm */
+void sctp_transport_dst_confirm(struct sctp_transport *t)
+{
+       t->dst_pending_confirm = 1;
+}