Skip to content

Commit

Permalink
tipc: Fix bug in scope checking for multicast messages
Browse files Browse the repository at this point in the history
This patch ensures that TIPC's multicast message name lookup
algorithm does individualized scope checking for each published
name it examines.  Previously, scope checking was only done for
the first name in a name table publication list, which could
result in incoming multicast messages being delivered to ports
publishing names with "node" scope, or not being delivered to
ports publishing names with "cluster" or "zone" scope.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Allan Stephens authored and David S. Miller committed Jul 15, 2008
1 parent 0e35fd5 commit 08d2cf0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/tipc/name_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,9 +710,11 @@ int tipc_nametbl_mc_translate(u32 type, u32 lower, u32 upper, u32 limit,
if (sseq->lower > upper)
break;
publ = sseq->cluster_list;
if (publ && (publ->scope <= limit))
if (publ)
do {
if (publ->node == tipc_own_addr)
if (publ->scope > limit)
/* ignore out-of-scope publication */ ;
else if (publ->node == tipc_own_addr)
tipc_port_list_add(dports, publ->ref);
else
res = 1;
Expand Down

0 comments on commit 08d2cf0

Please sign in to comment.