aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-10-25 12:19:05 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-02-06 16:59:16 -0500
commit4d75313ce9b832efc4efb487f080b5ed72beae2c (patch)
tree801ae5a62e6b53624e526fb2236015f3b2ef7e15 /net/tipc/link.c
parent92d2c905b404d8d056ce35a0ce645e23529742c2 (diff)
tipc: Prevent broadcast link stalling in dual LAN environments
Ensure that sequence number information about incoming broadcast link messages is initialized only by the activation of the first link to a given cluster node. Previously, a race condition allowed reset and/or activation messages for a second link to re-initialize this sequence number information with obsolete values. This could trigger TIPC to request the retransmission of previously acknowledged broadcast link messages from that node, resulting in broadcast link processing becoming stalled if the node had already released one or more of those messages and was unable to perform the required retransmission. Thanks to Laser <gotolaser@gmail.com> for identifying this problem and assisting in the development of this fix. 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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index bee316ce387c..4ea6cad11746 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -2128,14 +2128,15 @@ static void link_recv_proto_msg(struct tipc_link *l_ptr, struct sk_buff *buf)
2128 } 2128 }
2129 l_ptr->owner->bclink.supported = (max_pkt_info != 0); 2129 l_ptr->owner->bclink.supported = (max_pkt_info != 0);
2130 2130
2131 /* Synchronize broadcast link info, if not done previously */
2132
2133 if (!tipc_node_is_up(l_ptr->owner))
2134 l_ptr->owner->bclink.last_in = msg_last_bcast(msg);
2135
2131 link_state_event(l_ptr, msg_type(msg)); 2136 link_state_event(l_ptr, msg_type(msg));
2132 2137
2133 l_ptr->peer_session = msg_session(msg); 2138 l_ptr->peer_session = msg_session(msg);
2134 l_ptr->peer_bearer_id = msg_bearer_id(msg); 2139 l_ptr->peer_bearer_id = msg_bearer_id(msg);
2135
2136 /* Synchronize broadcast sequence numbers */
2137 if (!tipc_node_redundant_links(l_ptr->owner))
2138 l_ptr->owner->bclink.last_in = mod(msg_last_bcast(msg));
2139 break; 2140 break;
2140 case STATE_MSG: 2141 case STATE_MSG:
2141 2142