aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2010-08-17 07:00:16 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-17 20:32:00 -0400
commit5a68d5ee000bb784c4856391b4861739c8bbd341 (patch)
treebf00540edd8adae24f3805b08d53ba37af6366d7 /net/tipc/link.c
parent564e83b51a12b794e3f63a2d872398e1ee21616f (diff)
tipc: Prevent missing name table entries when link flip-flops rapidly
Ensure that TIPC does not re-establish communication with a neighboring node until it has finished updating all data structures containing information about that node to reflect the earlier loss of contact. Previously, it was possible for TIPC to perform its purge of name table entries relating to the node once contact had already been re-established, resulting in the unwanted removal of valid name table entries. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r--net/tipc/link.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 9d18c9b7638b..a6a3102bb4d6 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1869,13 +1869,22 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr)
1869 goto cont; 1869 goto cont;
1870 } 1870 }
1871 1871
1872 /* Locate unicast link endpoint that should handle message */ 1872 /* Locate neighboring node that sent message */
1873 1873
1874 n_ptr = tipc_node_find(msg_prevnode(msg)); 1874 n_ptr = tipc_node_find(msg_prevnode(msg));
1875 if (unlikely(!n_ptr)) 1875 if (unlikely(!n_ptr))
1876 goto cont; 1876 goto cont;
1877 tipc_node_lock(n_ptr); 1877 tipc_node_lock(n_ptr);
1878 1878
1879 /* Don't talk to neighbor during cleanup after last session */
1880
1881 if (n_ptr->cleanup_required) {
1882 tipc_node_unlock(n_ptr);
1883 goto cont;
1884 }
1885
1886 /* Locate unicast link endpoint that should handle message */
1887
1879 l_ptr = n_ptr->links[b_ptr->identity]; 1888 l_ptr = n_ptr->links[b_ptr->identity];
1880 if (unlikely(!l_ptr)) { 1889 if (unlikely(!l_ptr)) {
1881 tipc_node_unlock(n_ptr); 1890 tipc_node_unlock(n_ptr);