diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2009-06-23 17:28:05 +0200 |
---|---|---|
committer | Vlad Yasevich <vladislav.yasevich@hp.com> | 2009-09-05 00:20:55 +0200 |
commit | 40187886bc31aee9c5c6f08f46cde4ab618e9736 (patch) | |
tree | 93d569af329d9516ac2b586e808a6c2b8e3629e7 /net/sctp/associola.c | |
parent | sctp: update the route for non-active transports after addresses are added (diff) | |
download | linux-40187886bc31aee9c5c6f08f46cde4ab618e9736.tar.xz linux-40187886bc31aee9c5c6f08f46cde4ab618e9736.zip |
sctp: release cached route when the transport goes down.
When the sctp transport is marked down, we can release the
cached route and force a new lookup when attempting to use
this transport for anything. This way, if a better route
or source address is available, we'll try to use it.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r-- | net/sctp/associola.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 525864bf4f07..215b56951d76 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c @@ -810,11 +810,16 @@ void sctp_assoc_control_transport(struct sctp_association *asoc, break; case SCTP_TRANSPORT_DOWN: - /* if the transort was never confirmed, do not transition it - * to inactive state. + /* If the transport was never confirmed, do not transition it + * to inactive state. Also, release the cached route since + * there may be a better route next time. */ if (transport->state != SCTP_UNCONFIRMED) transport->state = SCTP_INACTIVE; + else { + dst_release(transport->dst); + transport->dst = NULL; + } spc_state = SCTP_ADDR_UNREACHABLE; break; |