Skip to content

Commit

Permalink
tipc: fix bug in broadcast synch message create function
Browse files Browse the repository at this point in the history
In commit d999297
("tipc: reduce locking scope during packet reception") we introduced
a new function tipc_build_bcast_sync_msg(), which carries initial
synchronization data between two nodes at first contact and at
re-contact. In this function, we missed to add synchronization data,
with the effect that the broadcast link endpoints will fail to
synchronize correctly at re-contact between a running and a restarted
node. All other cases work as intended.

With this commit, we fix this bug.

Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jon Maloy authored and David S. Miller committed Jul 29, 2015
1 parent 73d0fcf commit 5a4c355
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/tipc/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,14 @@ static void tipc_link_build_bcast_sync_msg(struct tipc_link *l,
{
struct sk_buff *skb;
struct sk_buff_head list;
u16 last_sent;

skb = tipc_msg_create(BCAST_PROTOCOL, STATE_MSG, INT_H_SIZE,
0, l->addr, link_own_addr(l), 0, 0, 0);
if (!skb)
return;
last_sent = tipc_bclink_get_last_sent(l->owner->net);
msg_set_last_bcast(buf_msg(skb), last_sent);
__skb_queue_head_init(&list);
__skb_queue_tail(&list, skb);
tipc_link_xmit(l, &list, xmitq);
Expand Down

0 comments on commit 5a4c355

Please sign in to comment.