aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-04-07 09:54:43 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-09-01 11:16:35 -0400
commit641c218d120b03bdea4f658ab44930587cff9158 (patch)
tree223ef08cadbfbc116d5a3ade058cd96d7a095c27 /net/tipc/link.c
parentf882cb7684cf54d4f5d3e25443a80a039e1b4bd7 (diff)
tipc: Enhance filtering of out-dated link reset messages
Ensure TIPC ignores an out-dated link reset message whose session number predates the current session number. (Previously, TIPC only ignored an out-date reset message whose session number was equal to the current link session number.) Out-dated link reset messages should not occur under normal circumstances; however, they can be generated if a link endpoint is unable to send a link reset message right away and queues it for later delivery, but the queued message is not sent until after the link is established. Thanks to Laser [gotolaser@gmail.com] for diagnosing the problem and contributing a prototype patch. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r--net/tipc/link.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index e0bf6d5f1668..b43beea54108 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -2045,8 +2045,8 @@ static void link_recv_proto_msg(struct link *l_ptr, struct sk_buff *buf)
2045 case RESET_MSG: 2045 case RESET_MSG:
2046 if (!link_working_unknown(l_ptr) && 2046 if (!link_working_unknown(l_ptr) &&
2047 (l_ptr->peer_session != INVALID_SESSION)) { 2047 (l_ptr->peer_session != INVALID_SESSION)) {
2048 if (msg_session(msg) == l_ptr->peer_session) 2048 if (less_eq(msg_session(msg), l_ptr->peer_session))
2049 break; /* duplicate: ignore */ 2049 break; /* duplicate or old reset: ignore */
2050 } 2050 }
2051 /* fall thru' */ 2051 /* fall thru' */
2052 case ACTIVATE_MSG: 2052 case ACTIVATE_MSG: