]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit - net/tipc/group.c
tipc: guarantee delivery of last broadcast before DOWN event
authorJon Maloy <jon.maloy@ericsson.com>
Fri, 13 Oct 2017 09:04:33 +0000 (11:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Oct 2017 15:46:01 +0000 (08:46 -0700)
commita3bada70660fb020430135ec8a774ae1ea6bc9a9
treee657ddef0e69ba7caa5059e1ca733cfafa601516
parent399574d41963285e72ba28dd46783c96316a81d1
tipc: guarantee delivery of last broadcast before DOWN event

The following scenario is possible:
- A user sends a broadcast message, and thereafter immediately leaves
  the group.
- The LEAVE message, following a different path than the broadcast,
  arrives ahead of the broadcast, and the sending member is removed
  from the receiver's list.
- The broadcast message arrives, but is dropped because the sender
  now is unknown to the receipient.

We fix this by sequence numbering membership events, just like ordinary
unicast messages. Currently, when a JOIN is sent to a peer, it contains
a synchronization point, - the sequence number of the next sent
broadcast, in order to give the receiver a start synchronization point.
We now let even LEAVE messages contain such an "end synchronization"
point, so that the recipient can delay the removal of the sending member
until it knows that all messages have been received.

The received synchronization points are added as sequence numbers to the
generated membership events, making it possible to handle them almost
the same way as regular unicasts in the receiving filter function. In
particular, a DOWN event with a too high sequence number will be kept
in the reordering queue until the missing broadcast(s) arrive and have
been delivered.

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>
net/tipc/group.c