diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2015-02-03 08:59:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-02-04 19:09:31 -0500 |
commit | 7d24dcdb3f3132e0ec36f19c49bd004bc874b8aa (patch) | |
tree | e42789818fc429ba6709f98732c7f6a31d5013b3 /net/tipc/node.c | |
parent | 2d72d49553d8de113d4eb1f69b2291f449a4c6bc (diff) |
tipc: avoid stale link after aborted failover
During link failover it may happen that the remaining link goes
down while it is still in the process of taking over traffic
from a previously failed link. When this happens, we currently
abort the failover procedure and reset the first failed link to
non-failover mode, so that it will be ready to re-establish
contact with its peer when it comes available.
However, if the first link goes down because its bearer was manually
disabled, it is not enough to reset it; it must also be deleted;
which is supposed to happen when the failover procedure is finished.
Otherwise it will remain a zombie link: attached to the owner node
structure, in mode LINK_STOPPED, and permanently blocking any re-
establishing of the link to the peer via the interface in question.
We fix this by amending the failover abort procedure. Apart from
resetting the link to non-failover state, we test if the link is
also in LINK_STOPPED mode. If so, we delete it, using the conditional
tipc_link_delete() function introduced in the previous commit.
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/tipc/node.c')
-rw-r--r-- | net/tipc/node.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index ee5d33cfcf80..d4cb8c127063 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -406,6 +406,10 @@ static void node_lost_contact(struct tipc_node *n_ptr) | |||
406 | l_ptr->reset_checkpoint = l_ptr->next_in_no; | 406 | l_ptr->reset_checkpoint = l_ptr->next_in_no; |
407 | l_ptr->exp_msg_count = 0; | 407 | l_ptr->exp_msg_count = 0; |
408 | tipc_link_reset_fragments(l_ptr); | 408 | tipc_link_reset_fragments(l_ptr); |
409 | |||
410 | /* Link marked for deletion after failover? => do it now */ | ||
411 | if (l_ptr->flags & LINK_STOPPED) | ||
412 | tipc_link_delete(l_ptr); | ||
409 | } | 413 | } |
410 | 414 | ||
411 | n_ptr->action_flags &= ~TIPC_WAIT_OWN_LINKS_DOWN; | 415 | n_ptr->action_flags &= ~TIPC_WAIT_OWN_LINKS_DOWN; |