]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: update mon's self addr when node addr generated
authorHoang Le <hoang.h.le@dektech.com.au>
Tue, 12 Nov 2019 00:40:04 +0000 (07:40 +0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Nov 2019 03:45:45 +0000 (19:45 -0800)
commitb01dff9dfe5cfcb5e6526743dc1f9309ca8b89ca
tree521333f62319b6a56a518f1cc6444a7b05f7be5a
parent7a09b8f5cf7e0970558980a770444fcb31af1e5b
tipc: update mon's self addr when node addr generated

In commit 8a3f90a20407 ("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: 8a3f90a20407 ("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>
net/tipc/monitor.c
net/tipc/monitor.h
net/tipc/net.c