aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r--net/tipc/node.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index 004834bd1605..937cc6192bcf 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -423,6 +423,8 @@ static void __tipc_node_link_down(struct tipc_node *n, int *bearer_id,
423 423
424 /* There is still a working link => initiate failover */ 424 /* There is still a working link => initiate failover */
425 tnl = node_active_link(n, 0); 425 tnl = node_active_link(n, 0);
426 tipc_link_fsm_evt(tnl, LINK_SYNCH_END_EVT);
427 tipc_node_fsm_evt(n, NODE_SYNCH_END_EVT);
426 n->sync_point = tnl->rcv_nxt + (U16_MAX / 2 - 1); 428 n->sync_point = tnl->rcv_nxt + (U16_MAX / 2 - 1);
427 tipc_link_tnl_prepare(l, tnl, FAILOVER_MSG, xmitq); 429 tipc_link_tnl_prepare(l, tnl, FAILOVER_MSG, xmitq);
428 tipc_link_reset(l); 430 tipc_link_reset(l);
@@ -1140,6 +1142,10 @@ static bool tipc_node_check_state(struct tipc_node *n, struct sk_buff *skb,
1140 return true; 1142 return true;
1141 } 1143 }
1142 1144
1145 /* No synching needed if only one link */
1146 if (!pl || !tipc_link_is_up(pl))
1147 return true;
1148
1143 /* Initiate or update synch mode if applicable */ 1149 /* Initiate or update synch mode if applicable */
1144 if ((usr == TUNNEL_PROTOCOL) && (mtyp == SYNCH_MSG)) { 1150 if ((usr == TUNNEL_PROTOCOL) && (mtyp == SYNCH_MSG)) {
1145 syncpt = iseqno + exp_pkts - 1; 1151 syncpt = iseqno + exp_pkts - 1;
@@ -1158,9 +1164,8 @@ static bool tipc_node_check_state(struct tipc_node *n, struct sk_buff *skb,
1158 1164
1159 /* Open tunnel link when parallel link reaches synch point */ 1165 /* Open tunnel link when parallel link reaches synch point */
1160 if ((n->state == NODE_SYNCHING) && tipc_link_is_synching(l)) { 1166 if ((n->state == NODE_SYNCHING) && tipc_link_is_synching(l)) {
1161 if (pl) 1167 dlv_nxt = pl->rcv_nxt - mod(skb_queue_len(pl->inputq));
1162 dlv_nxt = mod(pl->rcv_nxt - skb_queue_len(pl->inputq)); 1168 if (more(dlv_nxt, n->sync_point)) {
1163 if (!pl || more(dlv_nxt, n->sync_point)) {
1164 tipc_link_fsm_evt(l, LINK_SYNCH_END_EVT); 1169 tipc_link_fsm_evt(l, LINK_SYNCH_END_EVT);
1165 tipc_node_fsm_evt(n, NODE_SYNCH_END_EVT); 1170 tipc_node_fsm_evt(n, NODE_SYNCH_END_EVT);
1166 return true; 1171 return true;