Skip to content

Commit 032062f

Browse files
lmcjomakuba-moo
authored andcommitted
tipc: fix wrong publisher node address in link publications
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: 50a3499 ("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>
1 parent 6605cc6 commit 032062f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/tipc/node.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ static void tipc_node_write_unlock(struct tipc_node *n)
413413
tipc_uaddr(&ua, TIPC_SERVICE_RANGE, TIPC_NODE_SCOPE,
414414
TIPC_LINK_STATE, n->addr, n->addr);
415415
sk.ref = n->link_id;
416-
sk.node = n->addr;
416+
sk.node = tipc_own_addr(net);
417417
bearer_id = n->link_id & 0xffff;
418418
publ_list = &n->publ_list;
419419

0 commit comments

Comments
 (0)