--- x/net/rose/rose_route.c +++ y/net/rose/rose_route.c @@ -500,8 +500,10 @@ void rose_rt_device_down(struct net_devi for (i = 0; i < t->count; i++) { if (t->neighbour[i] != s) continue; + t->neighbour[i] = NULL; t->count--; + continue; switch (i) { case 0: @@ -689,6 +691,8 @@ struct rose_neigh *rose_get_neigh(rose_a for (node = rose_node_list; node != NULL; node = node->next) { if (rosecmpm(addr, &node->address, node->mask) == 0) { for (i = 0; i < node->count; i++) { + if (!node->neighbour[i]) + continue; if (node->neighbour[i]->restarted) { res = node->neighbour[i]; goto out; @@ -700,6 +704,8 @@ struct rose_neigh *rose_get_neigh(rose_a for (node = rose_node_list; node != NULL; node = node->next) { if (rosecmpm(addr, &node->address, node->mask) == 0) { for (i = 0; i < node->count; i++) { + if (!node->neighbour[i]) + continue; if (!rose_ftimer_running(node->neighbour[i])) { res = node->neighbour[i]; goto out;