diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2006-06-26 02:52:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-06-26 02:52:50 -0400 |
commit | 5392d646886d8f1ae01be69c10600b8df5284c41 (patch) | |
tree | 38f6c38498dc7f1632cc04a50098b82037307e44 /net/tipc/node.c | |
parent | a10bd924a421e0e5d5bb9640735b9317b8e473b5 (diff) |
[TIPC]: Fixed link switchover bugs
Incorporates several related fixes:
- switchover now occurs when switching from an active link to a standby link
- failure of a standby link no longer initiates switchover
- links now display correct # of received packtes following reactivation
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Per Liden <per.liden@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 | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index 5f097547d3e3..ce9678efa98a 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -125,6 +125,8 @@ void tipc_node_link_up(struct node *n_ptr, struct link *l_ptr) | |||
125 | { | 125 | { |
126 | struct link **active = &n_ptr->active_links[0]; | 126 | struct link **active = &n_ptr->active_links[0]; |
127 | 127 | ||
128 | n_ptr->working_links++; | ||
129 | |||
128 | info("Established link <%s> on network plane %c\n", | 130 | info("Established link <%s> on network plane %c\n", |
129 | l_ptr->name, l_ptr->b_ptr->net_plane); | 131 | l_ptr->name, l_ptr->b_ptr->net_plane); |
130 | 132 | ||
@@ -185,6 +187,8 @@ void tipc_node_link_down(struct node *n_ptr, struct link *l_ptr) | |||
185 | { | 187 | { |
186 | struct link **active; | 188 | struct link **active; |
187 | 189 | ||
190 | n_ptr->working_links--; | ||
191 | |||
188 | if (!tipc_link_is_active(l_ptr)) { | 192 | if (!tipc_link_is_active(l_ptr)) { |
189 | info("Lost standby link <%s> on network plane %c\n", | 193 | info("Lost standby link <%s> on network plane %c\n", |
190 | l_ptr->name, l_ptr->b_ptr->net_plane); | 194 | l_ptr->name, l_ptr->b_ptr->net_plane); |
@@ -214,8 +218,7 @@ int tipc_node_has_active_links(struct node *n_ptr) | |||
214 | 218 | ||
215 | int tipc_node_has_redundant_links(struct node *n_ptr) | 219 | int tipc_node_has_redundant_links(struct node *n_ptr) |
216 | { | 220 | { |
217 | return (tipc_node_has_active_links(n_ptr) && | 221 | return (n_ptr->working_links > 1); |
218 | (n_ptr->active_links[0] != n_ptr->active_links[1])); | ||
219 | } | 222 | } |
220 | 223 | ||
221 | static int tipc_node_has_active_routes(struct node *n_ptr) | 224 | static int tipc_node_has_active_routes(struct node *n_ptr) |