aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorJon Maloy <jon.maloy@ericsson.com>2017-10-13 05:04:32 -0400
committerDavid S. Miller <davem@davemloft.net>2017-10-13 11:46:01 -0400
commit399574d41963285e72ba28dd46783c96316a81d1 (patch)
tree43385ba22e204883b790a6a8344fcba4b203b2b1 /net/tipc/socket.c
parent2f487712b89376fce267223bbb0db93d393d4b09 (diff)
tipc: guarantee delivery of UP event before first broadcast
The following scenario is possible: - A user joins a group, and immediately sends out a broadcast message to its members. - The broadcast message, following a different data path than the initial JOIN message sent out during the joining procedure, arrives to a receiver before the latter.. - The receiver drops the message, since it is not ready to accept any messages until the JOIN has arrived. We avoid this by treating group protocol JOIN messages like unicast messages. - We let them pass through the recipient's multicast input queue, just like ordinary unicasts. - We force the first following broadacst to be sent as replicated unicast and being acknowledged by the recipient before accepting any more broadcast transmissions. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r--net/tipc/socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index b1f1c3c2b1e2..2bbab4fe2f53 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -2762,6 +2762,10 @@ static int tipc_sk_join(struct tipc_sock *tsk, struct tipc_group_req *mreq)
2762 rc = tipc_sk_publish(tsk, mreq->scope, &seq); 2762 rc = tipc_sk_publish(tsk, mreq->scope, &seq);
2763 if (rc) 2763 if (rc)
2764 tipc_group_delete(net, grp); 2764 tipc_group_delete(net, grp);
2765
2766 /* Eliminate any risk that a broadcast overtakes the sent JOIN */
2767 tsk->mc_method.rcast = true;
2768 tsk->mc_method.mandatory = true;
2765 return rc; 2769 return rc;
2766} 2770}
2767 2771