aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2015-02-03 08:59:20 -0500
committerDavid S. Miller <davem@davemloft.net>2015-02-04 19:09:31 -0500
commitaf9946fde9983e1312e5bcda7d1658fee2a3cb1d (patch)
tree9804ac41fbf6758b52ebec7c981a714d9d9199bd /net
parentb45db71b525d75e520d7ef46c796f49c5d26c07c (diff)
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>
Diffstat (limited to 'net')
-rw-r--r--net/tipc/link.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 46aa59955299..77c7ccd492b5 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -649,7 +649,9 @@ static void link_state_event(struct tipc_link *l_ptr, unsigned int event)
649 break; 649 break;
650 case STARTING_EVT: 650 case STARTING_EVT:
651 l_ptr->flags |= LINK_STARTED; 651 l_ptr->flags |= LINK_STARTED;
652 /* fall through */ 652 l_ptr->fsm_msg_cnt++;
653 link_set_timer(l_ptr, cont_intv);
654 break;
653 case TIMEOUT_EVT: 655 case TIMEOUT_EVT:
654 tipc_link_proto_xmit(l_ptr, RESET_MSG, 0, 0, 0, 0, 0); 656 tipc_link_proto_xmit(l_ptr, RESET_MSG, 0, 0, 0, 0, 0);
655 l_ptr->fsm_msg_cnt++; 657 l_ptr->fsm_msg_cnt++;