aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-04-07 11:58:08 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-09-01 11:16:36 -0400
commitc5bd4d85d356199ebdbc2c8bbfff86a292c65a9f (patch)
tree8bc891a81d612b20dd1841694cb52893e7347f8c /net
parent23f0ff906af93be6edb579824474117b232c7cc0 (diff)
tipc: Enhance cleanup of broadcast link when contact with node is lost
Enhances cleanup of broadcast link-related information when contact with a node is lost. 1) All broadcast link-related cleanup now occurs only if the lost node was capable of communicating over the broadcast link. 2) Following cleanup, the lost node is marked as no longer supporting the broadcast link, ensuring that any remaining broadcast messages received from that node prior to the re-establishment of a normal communication link are ignored. Thanks to Surya [Suryanarayana.Garlapati@emerson.com] for contributing a prototype version of this patch. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/tipc/node.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 2d106ef4fa4c..810b39545264 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -331,28 +331,32 @@ static void node_lost_contact(struct tipc_node *n_ptr)
331 char addr_string[16]; 331 char addr_string[16];
332 u32 i; 332 u32 i;
333 333
334 /* Clean up broadcast reception remains */ 334 info("Lost contact with %s\n",
335 n_ptr->bclink.gap_after = n_ptr->bclink.gap_to = 0; 335 tipc_addr_string_fill(addr_string, n_ptr->addr));
336 while (n_ptr->bclink.deferred_head) { 336
337 struct sk_buff *buf = n_ptr->bclink.deferred_head; 337 /* Flush broadcast link info associated with lost node */
338 n_ptr->bclink.deferred_head = buf->next;
339 buf_discard(buf);
340 }
341 if (n_ptr->bclink.defragm) {
342 buf_discard(n_ptr->bclink.defragm);
343 n_ptr->bclink.defragm = NULL;
344 }
345 338
346 if (n_ptr->bclink.supported) { 339 if (n_ptr->bclink.supported) {
340 n_ptr->bclink.gap_after = n_ptr->bclink.gap_to = 0;
341 while (n_ptr->bclink.deferred_head) {
342 struct sk_buff *buf = n_ptr->bclink.deferred_head;
343 n_ptr->bclink.deferred_head = buf->next;
344 buf_discard(buf);
345 }
346
347 if (n_ptr->bclink.defragm) {
348 buf_discard(n_ptr->bclink.defragm);
349 n_ptr->bclink.defragm = NULL;
350 }
351
347 tipc_bclink_acknowledge(n_ptr, 352 tipc_bclink_acknowledge(n_ptr,
348 mod(n_ptr->bclink.acked + 10000)); 353 mod(n_ptr->bclink.acked + 10000));
349 tipc_nmap_remove(&tipc_bcast_nmap, n_ptr->addr); 354 tipc_nmap_remove(&tipc_bcast_nmap, n_ptr->addr);
350 if (n_ptr->addr < tipc_own_addr) 355 if (n_ptr->addr < tipc_own_addr)
351 tipc_own_tag--; 356 tipc_own_tag--;
352 }
353 357
354 info("Lost contact with %s\n", 358 n_ptr->bclink.supported = 0;
355 tipc_addr_string_fill(addr_string, n_ptr->addr)); 359 }
356 360
357 /* Abort link changeover */ 361 /* Abort link changeover */
358 for (i = 0; i < MAX_BEARERS; i++) { 362 for (i = 0; i < MAX_BEARERS; i++) {