]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: simplify handling of lookup scope during multicast message reception
authorJon Maloy <jmaloy@redhat.com>
Wed, 2 Jun 2021 17:44:26 +0000 (13:44 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Jun 2021 21:06:39 +0000 (14:06 -0700)
commitd5bb16962ac75d8c848624f46413e6a22c2ad108
treeb52e70528efde231cb77041e45f35f23acd927a2
parentd22ab98af4540daa4e2194d527eb1a2ff84c7587
tipc: simplify handling of lookup scope during multicast message reception

We introduce a new macro TIPC_ANY_SCOPE to make the handling of the
lookup scope value more comprehensible during multicast reception.

The (unchanged) rules go as follows:

1) Multicast messages sent from own node are delivered to all matching
   sockets on the own node, irrespective of their binding scope.

2) Multicast messages sent from other nodes arrive here because they
   have found TIPC_CLUSTER_SCOPE bindings emanating from this node.
   Those messages should be delivered to exactly those sockets, but not
   to local sockets bound with TIPC_NODE_SCOPE, since the latter
   obviously were not meant to be visible for those senders.

3) Group multicast/broadcast messages are delivered to the sockets with
   a binding scope matching exactly the lookup scope indicated in the
   message header, and nobody else.

Reviewed-by: Xin Long <lucien.xin@gmail.com>
Tested-by: Hoang Le <hoang.h.le@dektech.com.au>
Signed-off-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/name_table.c
net/tipc/name_table.h
net/tipc/socket.c