diff options
Diffstat (limited to 'src/route.c')
-rw-r--r-- | src/route.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/route.c b/src/route.c index fed699c..bffb4c7 100644 --- a/src/route.c +++ b/src/route.c @@ -130,6 +130,8 @@ static gp_babel_metric_seqno_t get_metric(gmrf_context_t *ctx, const gp_babel_ro } static void update_nexthop(gmrf_context_t *ctx, gp_babel_route_t *route) { + bool had_selected = route->selected; + route->selected = select_nexthop(ctx, route); route->metric = get_metric(ctx, route); @@ -139,9 +141,11 @@ static void update_nexthop(gmrf_context_t *ctx, gp_babel_route_t *route) { &route->selected->neigh->addr, route->metric.metric); } else { - gp_babel_send_seqno_request_for(ctx, NULL, route); + if (had_selected) { + gp_babel_send_seqno_request_for(ctx, NULL, route); - gmrf_debug_route_lost(ctx->gmrf, route->node.id, sizeof(gp_babel_node_id_t)); + gmrf_debug_route_lost(ctx->gmrf, route->node.id, sizeof(gp_babel_node_id_t)); + } } /* triggered updates */ |