patch-2.1.126 linux/net/netrom/nr_route.c
Next file: linux/net/unix/garbage.c
Previous file: linux/net/netrom/nr_loopback.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Fri Oct 9 11:56:59 1998
- Orig file:
v2.1.125/linux/net/netrom/nr_route.c
- Orig date:
Tue Apr 14 14:29:26 1998
diff -u --recursive --new-file v2.1.125/linux/net/netrom/nr_route.c linux/net/netrom/nr_route.c
@@ -81,6 +81,22 @@
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;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov