diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2012-05-04 05:24:54 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-10 23:15:47 -0400 |
commit | e0268868ba064980488fc8c194db3d8e9fb2959c (patch) | |
tree | 7b8bfb4cceb0a5d184a2fe651aab5aec59a216d3 /net/sctp/output.c | |
parent | c57b54684060c8aced64a5b78ff69ff289af97b9 (diff) | |
download | linux-rt-e0268868ba064980488fc8c194db3d8e9fb2959c.tar.gz |
sctp: check cached dst before using it
dst_check() will take care of SA (and obsolete field), hence
IPsec rekeying scenario is taken into account.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Vlad Yaseivch <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/output.c')
-rw-r--r-- | net/sctp/output.c | 4 |
1 files changed, 1 insertions, 3 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) */ 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); |