|
@@ -312,6 +312,8 @@ static void expire_routers() {
|
|
if (router->eol < now) {
|
|
if (router->eol < now) {
|
|
DEBUG_MSG("router " F_MAC " expired", F_MAC_VAR(router->src));
|
|
DEBUG_MSG("router " F_MAC " expired", F_MAC_VAR(router->src));
|
|
*prev_ptr = router->next;
|
|
*prev_ptr = router->next;
|
|
|
|
+ if (G.best_router == router)
|
|
|
|
+ G.best_router = NULL;
|
|
free(router);
|
|
free(router);
|
|
} else {
|
|
} else {
|
|
prev_ptr = &router->next;
|
|
prev_ptr = &router->next;
|