summaryrefslogtreecommitdiffstats
path: root/net/netrom/nr_route.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-01-04 16:03:48 +0000
commit78c388aed2b7184182c08428db1de6c872d815f5 (patch)
tree4b2003b1b4ceb241a17faa995da8dd1004bb8e45 /net/netrom/nr_route.c
parenteb7a5bf93aaa4be1d7c6181100ab7639e74d67f7 (diff)
Merge with Linux 2.1.131 and more MIPS goodies.
(Did I mention that CVS is buggy ...)
Diffstat (limited to 'net/netrom/nr_route.c')
-rw-r--r--net/netrom/nr_route.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/netrom/nr_route.c b/net/netrom/nr_route.c
index 26f5ac8dd..d46e45eb6 100644
--- a/net/netrom/nr_route.c
+++ b/net/netrom/nr_route.c
@@ -81,6 +81,22 @@ static int nr_add_node(ax25_address *nr, const char *mnemonic, ax25_address *ax2
if (ax25cmp(ax25, &nr_neigh->callsign) == 0 && nr_neigh->dev == dev)
break;
+ /*
+ * The L2 link to a neighbour has failed in the past
+ * and now a frame comes from this neighbour. We assume
+ * it was a temporary trouble with the link and reset the
+ * routes now (and not wait for a node broadcast).
+ */
+ if (nr_neigh != NULL && nr_neigh->failed != 0 && quality == 0) {
+ struct nr_node *node;
+
+ for (node = nr_node_list; node != NULL; node = node->next)
+ for (i = 0; i < node->count; i++)
+ if (node->routes[i].neighbour == nr_neigh)
+ if (i < node->which)
+ node->which = i;
+ }
+
if (nr_neigh != NULL)
nr_neigh->failed = 0;