tipc: update mon's self addr when node addr generated
commit 46cb01eeeb86fca6afe24dda1167b0cb95424e29 upstream. In commit25b0b9c4e8("tipc: handle collisions of 32-bit node address hash values"), the 32-bit node address only generated after one second trial period expired. However the self's addr in struct tipc_monitor do not update according to node address generated. This lead to it is always zero as initial value. As result, sorting algorithm using this value does not work as expected, neither neighbor monitoring framework. In this commit, we add a fix to update self's addr when 32-bit node address generated. Fixes:25b0b9c4e8("tipc: handle collisions of 32-bit node address hash values") Acked-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: Hoang Le <hoang.h.le@dektech.com.au> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d3c004899e
commit
295c9b554f
@@ -42,6 +42,7 @@
|
||||
#include "node.h"
|
||||
#include "bcast.h"
|
||||
#include "netlink.h"
|
||||
#include "monitor.h"
|
||||
|
||||
/*
|
||||
* The TIPC locking policy is designed to ensure a very fine locking
|
||||
@@ -136,6 +137,7 @@ static void tipc_net_finalize(struct net *net, u32 addr)
|
||||
tipc_set_node_addr(net, addr);
|
||||
tipc_named_reinit(net);
|
||||
tipc_sk_reinit(net);
|
||||
tipc_mon_reinit_self(net);
|
||||
tipc_nametbl_publish(net, TIPC_CFG_SRV, addr, addr,
|
||||
TIPC_CLUSTER_SCOPE, 0, addr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user