aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2008-07-15 01:44:32 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-15 01:44:32 -0400
commit08d2cf0f74b3ee5e773bb906043a0efe96ded229 (patch)
treec89d7c7a596e0e836109ba0758712642df7649a3 /net/tipc
parent0e35fd5e5264bb46d1febbe9cd9aa08421c21a96 (diff)
tipc: Fix bug in scope checking for multicast messages
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>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/name_table.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c
index 096f7bd240a0..1e53b0c8e73d 100644
--- a/net/tipc/name_table.c
+++ b/net/tipc/name_table.c
@@ -710,9 +710,11 @@ int tipc_nametbl_mc_translate(u32 type, u32 lower, u32 upper, u32 limit,
710 if (sseq->lower > upper) 710 if (sseq->lower > upper)
711 break; 711 break;
712 publ = sseq->cluster_list; 712 publ = sseq->cluster_list;
713 if (publ && (publ->scope <= limit)) 713 if (publ)
714 do { 714 do {
715 if (publ->node == tipc_own_addr) 715 if (publ->scope > limit)
716 /* ignore out-of-scope publication */ ;
717 else if (publ->node == tipc_own_addr)
716 tipc_port_list_add(dports, publ->ref); 718 tipc_port_list_add(dports, publ->ref);
717 else 719 else
718 res = 1; 720 res = 1;