Skip to content

Commit

Permalink
tipc: Flush unsent broadcast messages when contact with last node is …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Allan Stephens authored and Paul Gortmaker committed Dec 27, 2011
1 parent 9157baf commit 10745cd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion net/tipc/bcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,17 @@ void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked)

while (crs && less_eq(buf_seqno(crs), acked)) {
next = crs->next;
bcbuf_decr_acks(crs);

if (crs != bcl->next_out)
bcbuf_decr_acks(crs);
else if (bclink->bcast_nodes.count)
break;
else {
bcbuf_set_acks(crs, 0);
bcl->next_out = next;
bclink_set_last_sent();
}

if (bcbuf_acks(crs) == 0) {
bcl->first_out = next;
bcl->out_queue_size--;
Expand Down

0 comments on commit 10745cd

Please sign in to comment.