netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net] tipc: fix wrong publisher node address in link publications
@ 2022-02-14  1:38 jmaloy
  2022-02-15  5:30 ` patchwork-bot+netdevbpf
  2022-02-15  8:16 ` Hoang Huu Le
  0 siblings, 2 replies; 3+ messages in thread
From: jmaloy @ 2022-02-14  1:38 UTC (permalink / raw)
  To: netdev, davem
  Cc: kuba, tipc-discussion, tung.q.nguyen, hoang.h.le, tuong.t.lien,
	jmaloy, maloy, xinl, ying.xue, parthasarathy.bhuvaragan

From: Jon Maloy <jmaloy@redhat.com>

When a link comes up we add its presence to the name table to make it
possible for users to subscribe for link up/down events. However, after
a previous call signature change the binding is wrongly published with
the peer node as publishing node, instead of the own node as it should
be. This has the effect that the command 'tipc name table show' will
list the link binding (service type 2) with node scope and a peer node
as originator, something that obviously is impossible.

We correct this bug here.

Fixes: 50a3499ab853 ("tipc: simplify signature of tipc_namtbl_publish()")

Signed-off-by: Jon Maloy <jmaloy@redhat.com>
---
 net/tipc/node.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tipc/node.c b/net/tipc/node.c
index 9947b7dfe1d2..fd95df338da7 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -413,7 +413,7 @@ static void tipc_node_write_unlock(struct tipc_node *n)
 	tipc_uaddr(&ua, TIPC_SERVICE_RANGE, TIPC_NODE_SCOPE,
 		   TIPC_LINK_STATE, n->addr, n->addr);
 	sk.ref = n->link_id;
-	sk.node = n->addr;
+	sk.node = tipc_own_addr(net);
 	bearer_id = n->link_id & 0xffff;
 	publ_list = &n->publ_list;
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [net] tipc: fix wrong publisher node address in link publications
  2022-02-14  1:38 [net] tipc: fix wrong publisher node address in link publications jmaloy
@ 2022-02-15  5:30 ` patchwork-bot+netdevbpf
  2022-02-15  8:16 ` Hoang Huu Le
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-02-15  5:30 UTC (permalink / raw)
  To: Jon Maloy
  Cc: netdev, davem, kuba, tipc-discussion, tung.q.nguyen, hoang.h.le,
	tuong.t.lien, maloy, xinl, ying.xue, parthasarathy.bhuvaragan

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Sun, 13 Feb 2022 20:38:52 -0500 you wrote:
> From: Jon Maloy <jmaloy@redhat.com>
> 
> When a link comes up we add its presence to the name table to make it
> possible for users to subscribe for link up/down events. However, after
> a previous call signature change the binding is wrongly published with
> the peer node as publishing node, instead of the own node as it should
> be. This has the effect that the command 'tipc name table show' will
> list the link binding (service type 2) with node scope and a peer node
> as originator, something that obviously is impossible.
> 
> [...]

Here is the summary with links:
  - [net] tipc: fix wrong publisher node address in link publications
    https://git.kernel.org/netdev/net/c/032062f363b4

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [net] tipc: fix wrong publisher node address in link publications
  2022-02-14  1:38 [net] tipc: fix wrong publisher node address in link publications jmaloy
  2022-02-15  5:30 ` patchwork-bot+netdevbpf
@ 2022-02-15  8:16 ` Hoang Huu Le
  1 sibling, 0 replies; 3+ messages in thread
From: Hoang Huu Le @ 2022-02-15  8:16 UTC (permalink / raw)
  To: jmaloy@redhat.com, netdev@vger.kernel.org, davem@davemloft.net
  Cc: kuba@kernel.org, tipc-discussion@lists.sourceforge.net,
	Tung Quang Nguyen, Tuong Tong Lien, maloy@donjonn.com,
	xinl@redhat.com, ying.xue@windriver.com,
	parthasarathy.bhuvaragan@gmail.com

Hi Jon,

It seems this fix caused a problem with user type service as its always treated as node scope.
The sending side does not know a service binding on peer node as it looks up on itself node address.

Regards,
Hoang
> -----Original Message-----
> From: jmaloy@redhat.com <jmaloy@redhat.com>
> Sent: Monday, February 14, 2022 8:39 AM
> To: netdev@vger.kernel.org; davem@davemloft.net
> Cc: kuba@kernel.org; tipc-discussion@lists.sourceforge.net; Tung Quang Nguyen <tung.q.nguyen@dektech.com.au>; Hoang Huu Le
> <hoang.h.le@dektech.com.au>; Tuong Tong Lien <tuong.t.lien@dektech.com.au>; jmaloy@redhat.com; maloy@donjonn.com;
> xinl@redhat.com; ying.xue@windriver.com; parthasarathy.bhuvaragan@gmail.com
> Subject: [net] tipc: fix wrong publisher node address in link publications
> 
> From: Jon Maloy <jmaloy@redhat.com>
> 
> When a link comes up we add its presence to the name table to make it
> possible for users to subscribe for link up/down events. However, after
> a previous call signature change the binding is wrongly published with
> the peer node as publishing node, instead of the own node as it should
> be. This has the effect that the command 'tipc name table show' will
> list the link binding (service type 2) with node scope and a peer node
> as originator, something that obviously is impossible.
> 
> We correct this bug here.
> 
> Fixes: 50a3499ab853 ("tipc: simplify signature of tipc_namtbl_publish()")
> 
> Signed-off-by: Jon Maloy <jmaloy@redhat.com>
> ---
>  net/tipc/node.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/tipc/node.c b/net/tipc/node.c
> index 9947b7dfe1d2..fd95df338da7 100644
> --- a/net/tipc/node.c
> +++ b/net/tipc/node.c
> @@ -413,7 +413,7 @@ static void tipc_node_write_unlock(struct tipc_node *n)
>  	tipc_uaddr(&ua, TIPC_SERVICE_RANGE, TIPC_NODE_SCOPE,
>  		   TIPC_LINK_STATE, n->addr, n->addr);
>  	sk.ref = n->link_id;
> -	sk.node = n->addr;
> +	sk.node = tipc_own_addr(net);
>  	bearer_id = n->link_id & 0xffff;
>  	publ_list = &n->publ_list;
> 
> --
> 2.31.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-15  8:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-14  1:38 [net] tipc: fix wrong publisher node address in link publications jmaloy
2022-02-15  5:30 ` patchwork-bot+netdevbpf
2022-02-15  8:16 ` Hoang Huu Le

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).