aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-10-24 14:59:20 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-12-27 11:33:52 -0500
commit10745cd5990542447268f60078133df8b1ee960b (patch)
tree544d8226e2adf82a31e5bb7639c439a12bec7cea /net/tipc
parent9157bafb44637a2cfefc222d6551100ead40e79e (diff)
tipc: Flush unsent broadcast messages when contact with last node is lost
Adds code to release any unsent broadcast messages in the broadcast link transmit queue if TIPC loses contact with its only neighboring node. Previously, a broadcast link that was in the congested state would hold on to the unsent messages, even though the messages were now undeliverable. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/bcast.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index dd990b081435..4609819ea807 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -252,7 +252,17 @@ void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked)
252 252
253 while (crs && less_eq(buf_seqno(crs), acked)) { 253 while (crs && less_eq(buf_seqno(crs), acked)) {
254 next = crs->next; 254 next = crs->next;
255 bcbuf_decr_acks(crs); 255
256 if (crs != bcl->next_out)
257 bcbuf_decr_acks(crs);
258 else if (bclink->bcast_nodes.count)
259 break;
260 else {
261 bcbuf_set_acks(crs, 0);
262 bcl->next_out = next;
263 bclink_set_last_sent();
264 }
265
256 if (bcbuf_acks(crs) == 0) { 266 if (bcbuf_acks(crs) == 0) {
257 bcl->first_out = next; 267 bcl->first_out = next;
258 bcl->out_queue_size--; 268 bcl->out_queue_size--;