diff options
author | Vlad Yasevich <vladislav.yasevich@hp.com> | 2009-06-23 11:28:05 -0400 |
---|---|---|
committer | Vlad Yasevich <vladislav.yasevich@hp.com> | 2009-09-04 18:20:55 -0400 |
commit | 40187886bc31aee9c5c6f08f46cde4ab618e9736 (patch) | |
tree | 93d569af329d9516ac2b586e808a6c2b8e3629e7 /net/sctp | |
parent | 3cd9749c0b758223a71e059fa44c2234547d9ee0 (diff) |
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')
-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, | |||
810 | break; | 810 | break; |
811 | 811 | ||
812 | case SCTP_TRANSPORT_DOWN: | 812 | case SCTP_TRANSPORT_DOWN: |
813 | /* if the transort was never confirmed, do not transition it | 813 | /* If the transport was never confirmed, do not transition it |
814 | * to inactive state. | 814 | * to inactive state. Also, release the cached route since |
815 | * there may be a better route next time. | ||
815 | */ | 816 | */ |
816 | if (transport->state != SCTP_UNCONFIRMED) | 817 | if (transport->state != SCTP_UNCONFIRMED) |
817 | transport->state = SCTP_INACTIVE; | 818 | transport->state = SCTP_INACTIVE; |
819 | else { | ||
820 | dst_release(transport->dst); | ||
821 | transport->dst = NULL; | ||
822 | } | ||
818 | 823 | ||
819 | spc_state = SCTP_ADDR_UNREACHABLE; | 824 | spc_state = SCTP_ADDR_UNREACHABLE; |
820 | break; | 825 | break; |