aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorJon Maloy <jon.maloy@ericsson.com>2015-07-29 18:28:01 -0400
committerDavid S. Miller <davem@davemloft.net>2015-07-29 19:48:16 -0400
commit5a4c355229da12558b5ded0775f4d0bc6650d28d (patch)
treebbac41d545c27dfc8d50babf8286e3e8c1a9956b /net/tipc
parent73d0fcf2f487465f73329ee11ae900a774408fe5 (diff)
tipc: fix bug in broadcast synch message create function
In commit d999297c3dbbe7fdd832f7fa4ec84301e170b3e6 ("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>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/link.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index b63d57390bb7..cc40aa6eb66c 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -294,11 +294,14 @@ static void tipc_link_build_bcast_sync_msg(struct tipc_link *l,
294{ 294{
295 struct sk_buff *skb; 295 struct sk_buff *skb;
296 struct sk_buff_head list; 296 struct sk_buff_head list;
297 u16 last_sent;
297 298
298 skb = tipc_msg_create(BCAST_PROTOCOL, STATE_MSG, INT_H_SIZE, 299 skb = tipc_msg_create(BCAST_PROTOCOL, STATE_MSG, INT_H_SIZE,
299 0, l->addr, link_own_addr(l), 0, 0, 0); 300 0, l->addr, link_own_addr(l), 0, 0, 0);
300 if (!skb) 301 if (!skb)
301 return; 302 return;
303 last_sent = tipc_bclink_get_last_sent(l->owner->net);
304 msg_set_last_bcast(buf_msg(skb), last_sent);
302 __skb_queue_head_init(&list); 305 __skb_queue_head_init(&list);
303 __skb_queue_tail(&list, skb); 306 __skb_queue_tail(&list, skb);
304 tipc_link_xmit(l, &list, xmitq); 307 tipc_link_xmit(l, &list, xmitq);