summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2009-06-23 11:28:05 -0400
committerVlad Yasevich <vladislav.yasevich@hp.com>2009-09-04 18:20:55 -0400
commit40187886bc31aee9c5c6f08f46cde4ab618e9736 (patch)
tree93d569af329d9516ac2b586e808a6c2b8e3629e7 /net/sctp
parent3cd9749c0b758223a71e059fa44c2234547d9ee0 (diff)
downloadlinux-40187886bc31aee9c5c6f08f46cde4ab618e9736.tar.gz
linux-40187886bc31aee9c5c6f08f46cde4ab618e9736.tar.bz2
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')
-rw-r--r--net/sctp/associola.c9
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;