]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: separate link starting event from link timeout event
authorJon Paul Maloy <jon.maloy@ericsson.com>
Tue, 3 Feb 2015 13:59:20 +0000 (08:59 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Feb 2015 00:09:31 +0000 (16:09 -0800)
commit937cc7bb02d1eda4684cededc69bdd8816c5dfbf
tree9804ac41fbf6758b52ebec7c981a714d9d9199bd
parent065fbe8ee281067502eacf2e91a90ab7385bda1d
tipc: separate link starting event from link timeout event

When a new link instance is created, it is trigged to start by
sending it a TIPC_STARTING_EVT, whereafter a regular link
reset is applied to it.

The starting event is codewise treated as a timeout event, and prompts
a link RESET message to be sent to the peer node, carrying a link
session identifier. The later link_reset() call nudges this session
identifier, whereafter all subsequent RESET messages will be sent out
with the new identifier. The latter session number overrides the former,
causing the peer to unconditionally accept it irrespective of its
current working state.

We don't think that this causes any problem, but it is not in accordance
with the protocol spec, and may cause confusion when debugging TIPC
sessions.

To avoid this, we make the starting event distinct from the
subsequent timeout events, by not allowing the former to send
out any RESET message. This eliminates the described problem.

Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/link.c