tipc: fix wrong publisher node address in link publications
authorJon Maloy <jmaloy@redhat.com>
Mon, 14 Feb 2022 01:38:52 +0000 (20:38 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 11:03:12 +0000 (12:03 +0100)
commit1a16f047946b89a75d3d4c2d246f71c13d8131ac
tree01e8eee0588f2bd637535f4fd971899e8da84eef
parent868366d627e4c886878f76eaeadeee20f2f80dbe
tipc: fix wrong publisher node address in link publications

commit 032062f363b4bf02b1d547f329aa5d97b6a17410 upstream.

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>
Link: https://lore.kernel.org/r/20220214013852.2803940-1-jmaloy@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/tipc/node.c