]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: fix correct setting of message type in second discoverer
authorJon Maloy <jon.maloy@ericsson.com>
Fri, 6 Jul 2018 18:10:05 +0000 (20:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Jul 2018 10:49:01 +0000 (19:49 +0900)
commit747d82b3806e2b030748eb22d89fdb8b727df063
tree7d9db104a800f18ab9306c4064311953d32df15b
parent1e610648044f1502bc0ff594102ba264407f2864
tipc: fix correct setting of message type in second discoverer

The duplicate address discovery protocol is not safe against two
discoverers running in parallel. The one executing first after the
trial period is over will set the node address and change its own
message type to DSC_REQ_MSG. The one executing last may find that the
node address is already set, and never change message type, with the
result that its links may never be established.

In this commmit we ensure that the message type always is set correctly
after the trial period is over.

Fixes: b8bd0db28fc0 ("tipc: handle collisions of 32-bit node address hash values")
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/discover.c