• Jon Maloy's avatar
    tipc: simplify handling of lookup scope during multicast message reception · 5ef21325
    Jon Maloy authored
    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: default avatarXin Long <lucien.xin@gmail.com>
    Tested-by: default avatarHoang Le <hoang.h.le@dektech.com.au>
    Signed-off-by: default avatarJon Maloy <jmaloy@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5ef21325
socket.c 104 KB