Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08d2cf0f authored by Allan Stephens's avatar Allan Stephens Committed by David S. Miller
Browse files

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: default avatarAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0e35fd5e
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -710,9 +710,11 @@ int tipc_nametbl_mc_translate(u32 type, u32 lower, u32 upper, u32 limit,
		if (sseq->lower > upper)
		if (sseq->lower > upper)
			break;
			break;
		publ = sseq->cluster_list;
		publ = sseq->cluster_list;
		if (publ && (publ->scope <= limit))
		if (publ)
			do {
			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);
					tipc_port_list_add(dports, publ->ref);
				else
				else
					res = 1;
					res = 1;