netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] net: sctp: bug fixing when sctp path recovers
@ 2013-11-13  1:34 Chang Xiangzhong
  2013-11-13  2:37 ` Vlad Yasevich
  0 siblings, 1 reply; 11+ messages in thread
From: Chang Xiangzhong @ 2013-11-13  1:34 UTC (permalink / raw)
  To: vyasevich, nhorman, davem
  Cc: linux-sctp, netdev, linux-kernel, dreibh, Chang Xiangzhong

Look for the __two__ most recently used path/transport and set to active_path
and retran_path respectively

Signed-off-by: changxiangzhong@gmail.com
---
 net/sctp/associola.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index ab67efc..070011a 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -913,11 +913,15 @@ void sctp_assoc_control_transport(struct sctp_association *asoc,
 		if (!first || t->last_time_heard > first->last_time_heard) {
 			second = first;
 			first = t;
+			continue;
 		}
 		if (!second || t->last_time_heard > second->last_time_heard)
 			second = t;
 	}
 
+	if (!second)
+		second = first;
+
 	/* RFC 2960 6.4 Multi-Homed SCTP Endpoints
 	 *
 	 * By default, an endpoint should always transmit to the
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-11-13 21:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-13  1:34 [PATCH 1/1] net: sctp: bug fixing when sctp path recovers Chang Xiangzhong
2013-11-13  2:37 ` Vlad Yasevich
2013-11-13  2:54   ` Chang
2013-11-13  8:44     ` Daniel Borkmann
2013-11-13 19:06       ` Chang
2013-11-13 19:10         ` Daniel Borkmann
2013-11-13 20:48           ` Chang
2013-11-13 21:23             ` Chang
2013-11-13 21:31               ` Daniel Borkmann
2013-11-13 21:39             ` Vlad Yasevich
2013-11-13 14:22     ` Vlad Yasevich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).