aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-10-25 15:14:46 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-02-06 16:59:16 -0500
commit934993137199ffb56fef50664f87e71cdb3471b0 (patch)
treeeda9ba8ab9f8bed085ff108b38765b72aa8e4e50 /net/tipc/node.c
parent4d75313ce9b832efc4efb487f080b5ed72beae2c (diff)
tipc: Ensure broadcast link re-acquires node after link failure
Fix a bug that can prevent TIPC from sending broadcast messages to a node if contact with the node is lost and then regained. The problem occurs if the broadcast link first clears the flag indicating the node is part of the link's distribution set (when it loses contact with the node), and later fails to restore the flag (when contact is regained); restoration fails if contact with the node is regained by implicit unicast link activation triggered by the arrival of a data message, rather than explicitly by the arrival of a link activation message. The broadcast link now uses separate fields to track whether a node is theoretically capable of receiving broadcast messages versus whether it is actually part of the link's distribution set. The former member is updated by the receipt of link protocol messages, which can occur at any time; the latter member is updated only when contact with the node is gained or lost. This change also permits the simplification of several conditional expressions since the broadcast link's "supported" field can now only be set if there are working links to the associated node. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r--net/tipc/node.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 6b226faad89f..9196f943b835 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -306,8 +306,9 @@ static void node_established_contact(struct tipc_node *n_ptr)
306 /* Syncronize broadcast acks */ 306 /* Syncronize broadcast acks */
307 n_ptr->bclink.acked = tipc_bclink_get_last_sent(); 307 n_ptr->bclink.acked = tipc_bclink_get_last_sent();
308 308
309 if (n_ptr->bclink.supported) { 309 if (n_ptr->bclink.supportable) {
310 tipc_bclink_add_node(n_ptr->addr); 310 tipc_bclink_add_node(n_ptr->addr);
311 n_ptr->bclink.supported = 1;
311 if (n_ptr->addr < tipc_own_addr) 312 if (n_ptr->addr < tipc_own_addr)
312 tipc_own_tag++; 313 tipc_own_tag++;
313 } 314 }